in reply to mod_perl configuration of Apache2
I was able to get it to work using the same Ubuntu 9.04 (jaunty) configuration, using the apache2-mpm-prefork model. (Hooray for virtual machines!)
I added the snippet you provided to /etc/apache2/httpd.conf, which is ok since that file is included by /etc/apache2/apache2.conf. I fixed the one typo, changing "PerlOptions _ParseHeaders" to "PerlOptions +ParseHeaders".
Then I put the following "Hello World" program in the /var/www/perl directory, named hello.pl. I was surprised that I did not have to make it executable.
#!/usr/bin/perl print "Content-type: text/html\r\n\r\n"; print "<HTML>\n"; print "<HEAD><TITLE>Hello World!</TITLE></HEAD>\n"; print "<BODY>\n"; print "<H2>Hello World!</H2>\n"; print "</BODY>\n"; print "</HTML>\n"; exit (0);
And after stopping/starting the server, I got the expected output. I did do a full stop then start on the server. A restart will warn about the typo but not stop the server from executing. Perhaps this is your problem.
I didn't do anything special with permissions:
root@jackalope 680# ls -ld /var /var/www drwxr-xr-x 15 root root 4096 Dec 12 09:11 /var drwxr-xr-x 3 root root 4096 Dec 12 09:41 /var/www root@jackalope 681# ls -lRA /var/www /var/www: total 8 -rw-r--r-- 1 root root 45 Dec 12 09:11 index.html drwxr-xr-x 2 root root 4096 Dec 12 09:58 perl /var/www/perl: total 4 -rw-r--r-- 1 root root 232 Dec 12 09:58 hello.pl
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: mod_perl configuration of Apache2
by Bruce32903 (Scribe) on Dec 12, 2009 at 21:36 UTC | |
by Bruce32903 (Scribe) on Dec 12, 2009 at 22:22 UTC | |
by gmargo (Hermit) on Dec 13, 2009 at 11:56 UTC | |
by Bruce32903 (Scribe) on Dec 13, 2009 at 12:13 UTC |