Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
From the command line, I call /srv/www/cgi-bin/first.pl and I get:
Content-type: text/html
Hello world.
So there does not seem to be anything wrong with the script.
Yet, the browser gives me:
"Server error!
The server encountered an internal error and was unable to complete your request.
Error message:
Premature end of script headers: first.pl
If you think this is a server error, please contact the webmaster.
Error 500"
The system log gives me:
"May 19 08:54:33 HPa730n kernel: SubDomain: REJECTING x access to /srv/www/cgi-bin/cgi (httpd2-prefork(9971) profile /usr/sbin/httpd2-prefork active /usr/sbin/httpd2-prefork)"
Thank you for the suggestions.
Yes,I have checked everything in the link.
I have also chown'd the file to user -denis (that's me) and to group -users.
Same problem. UIt is an access problem all right as withnessed by the Apache2 error log file.
"[Fri May 19 12:06:00 2006] [error] [client 192.168.0.9] (13)Permission denied: exec of '/srv/www/cgi-bin/first2.pl' failed
[Fri May 19 12:06:00 2006] [error] [client 192.168.0.9] Premature end of script headers: first2.pl"
Distribution: Fedora Core 4, Fedora Core 5, Redhat 9.0, Solaris 10, WInXP pro, W2k pro
Posts: 30
Rep:
No no, what the other bloke ment was give the output of
ls -la /srv
ls -la /srv/www and
ls -la /srv/www/cgi-bin
Well the last one is shown in your reply but these other two should have permissions to execute by "anyone"...
Distribution: Fedora Core 4, Fedora Core 5, Redhat 9.0, Solaris 10, WInXP pro, W2k pro
Posts: 30
Rep:
Ok, now I think I know what is the issue here. You should not use Options +ExecCGI unless you have cgi-bin -directory outside the cgi-bin ScriptAlias. So if you have
Code:
ScriptAlias cgi-bin "/what/ever/cgi-bin/"
in your MainServer directive, you could try using
Code:
Options none
in your cgi-bin Directory directive.
To put it alltogether chance your config to
Code:
<Directory "/srv/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
save your configuration, restart server and laugh to me, if it doesn't work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.