Earlier I wrote how to execute perl scripts in Etch.
Now I use Lenny. A httpd.conf file does exist but it's empty. I assume one can configure either the file /etc/apache2/sites-available/default or a file like /etc/apache2/sites-available/example1.com.vhost.
I have tried to repeat the steps written in my earlier post in those files. Also, the permissions for files and folders are wide open (777) but I get either a Forbidden! or a misconfiguration message, depending on my different configuration attempts.
So I opened /etc/apache2/sites-available/default and found these lines:
<Directory /var/www/>
AllowOverride None
Order allow,deny
allow from all
</Directory>
I added Options Indexes FollowSymLinks ExecCGI to make it look like:
<Directory /var/www/>
Options Indexes FollowSymLinks ExecCGI
AllowOverride None
Order allow,deny
allow from all
</Directory>
I restarted the server: /etc/init.d/apache2 restart
I visited example1.com/test.pl
Result: ERROR 403 - Forbidden!
The following error occurred:
You are not permitted to access the reqested URL.
Please contact the webmaster with any queries.
I contacted the webmaster. That's me. And I don't know it.
Inside sites-enabled there is also configuration file example1.com.vhost, containing these lines:
# cgi enabled
<Directory /var/www/clients/client1/web1/cgi-bin>
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /var/www/clients/client1/web1/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
Now, I told the webmaster not to be lazy and he couldn't refuse because it was me, and in the example1.com.vhost file I changed the lines:
<Directory /var/www/clients/client1/web1/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
to look like (adding Indexes MultiViews ExecCGI):
<Directory /var/www/clients/client1/web1/web>
AddHandler cgi-script .cgi .pl
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
And then: /etc/init.d/apache2 restart
After which
www.example1.com/test.pl remained Forbidden! as ever.
And this is what the text.pl files contains:
#!/usr/bin/perl
print "Hello World.\n";
What a terrible day! Please, tell my what's good about Lenny.
Does anyone know how to run perl scripts in Lenny outside the cgi-bin?
Thanx in advance.
Recent comments
3 hours 20 min ago
10 hours 1 min ago
13 hours 52 min ago
15 hours 30 min ago
23 hours 56 min ago
1 day 9 hours ago
1 day 10 hours ago
1 day 13 hours ago
1 day 18 hours ago
1 day 18 hours ago