in reply to Re: setting up a localhost
in thread setting up a localhost
Running that code on the command line produces the following result which seems to have no errors:#!C:\perl\bin\perl.exe -w use strict; use CGI; my $query = new CGI; print $query->header( "text/html" ); print <<END_HERE; <html> <head> <title>My First CGI Script</title> </head> <body bgcolor="#FFFFCC"> <h1>This is a pretty lame Web page</h1> <p>Who is this Ovid guy, anyway?</p> </body> </html> END_HERE # must have a line after "END_HERE" or Perl won't recognize # the token
The Problem I am having is that I can't even get the apache test page to load when I type http://127.0.0.1 in for the URL.C:\Program Files\Apache Group\Apache2\cgi-bin>perl test.cgi Content-Type: text/html; charset=ISO-8859-1 <html> <head> <title>My First CGI Script</title> </head> <body bgcolor="#FFFFCC"> <h1>This is a pretty lame Web page</h1> <p>Who is this Ovid guy, anyway?</p> </body> </html>
I'm running apache 2.0.48# ServerName gives the name and port that the server uses to identify +itself. # This can often be determined automatically, but we recommend you spe +cify # it explicitly to prevent problems during startup. # # If this is not set to valid DNS name for your host, server-generated # redirections will not work. See also the UseCanonicalName directive +. # # If your host doesn't have a registered DNS name, enter its IP addres +s here. # You will have to access it by its address anyway, and this will make + # redirections work in a sensible way. # # 127.0.0.1:80 This didn't work # localhost This also didn't work for me. # ServerName 127.0.0.1
|
|---|