<?xml version="1.0" encoding="windows-1252"?>
<node id="974966" title="Re: Webhosting with Perl/CGI" created="2012-06-07 10:30:07" updated="2012-06-07 10:30:07">
<type id="11">
note</type>
<author id="248054">
Your Mother</author>
<data>
<field name="doctext">
&lt;p&gt;What [ww] said, though you don't even need a "real" webserver at this point.
&lt;/p&gt;
&lt;h3&gt;File hai.cgi&lt;/h3&gt;
&lt;code&gt;#!/usr/bin/env perl
use strictures;
use CGI qw(:standard);

print header(),
    start_html("OHAI"),
    h1("HAI DER"),
    blockquote("I CAN HAZ SEE GEE AIEE?"),
    p("KTHXBAI!"),
    end_html();
&lt;/code&gt;

&lt;h3&gt;Command line-&lt;/h3&gt;

&lt;code&gt;moo@cow[201]~&gt;plackup -L Shotgun -p 8080 -MPlack::App::WrapCGI -e 'Plack::App::WrapCGI-&gt;new(script =&gt; "/home/moo/hai.cgi")'

# HTTP::Server::PSGI: Accepting connections at http://0:8080/
&lt;/code&gt;

&lt;p&gt;Then visit your CGI at something like http://localhost:8080 depending on your box.&lt;/p&gt;

&lt;h3&gt;Helpful reading&lt;/h3&gt;
&lt;ul&gt;
 &lt;li&gt;[mod://Plack::App::WrapCGI]&lt;/li&gt;
 &lt;li&gt;[mod://Plack]&lt;/li&gt;
 &lt;li&gt;[mod://plackup]&lt;/li&gt;
 &lt;li&gt;[mod://App::cpanminus]&lt;/li&gt;
 &lt;li&gt;[mod://local::lib]&lt;/li&gt;
&lt;/ul&gt;</field>
<field name="root_node">
974937</field>
<field name="parent_node">
974937</field>
</data>
</node>
