Jump to content

Http Problem!!


lewkh

Recommended Posts

Hi Folk, I am running Fedora Core3 and httpd-2.0.52-3.1. I run the following URL in my browser

http://localhost/awstats/awstats.pl?config=mysite

But browser return me as 500 Internal Server Error and I check my /var/log/httpd/error_log as below

[Tue Sep 27 17:31:11 2005] [error] [client 127.0.0.1] (13)Permission denied: exec of '/usr/local/awstats/wwwroot/cgi-bin/awstats.pl' failed[Tue Sep 27 17:31:11 2005] [error] [client 127.0.0.1] Premature end of script headers: awstats.pl[Tue Sep 27 17:31:12 2005] [error] [client 127.0.0.1] attempt to invoke directory as script: /usr/local/awstats/wwwroot/cgi-bin/

my /etc/httpd/conf/httpd.conf detail as below:

Alias /awstatsclasses/ "/usr/local/awstats/wwwroot/classes/"Alias /awstatscss/ "/usr/local/awstats/wwwroot/css/"Alias /awstatsicons/ "/usr/local/awstats/wwwroot/icon/"ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"## This is to permit URL access to scripts/files in AWStats directory.#<Directory "/usr/local/awstats/wwwroot">	Options ExecCGI	AllowOverride None	Order allow,deny	Allow from all</Directory>

I am sure the awstats application is runable because I can generate static html file. But I do not know where I have done wrongly. Please advise what is the problem here? Thanks

Link to comment
Share on other sites

Check your Perl script for syntax errors. The error message suggests that to me. Also, double-check the permissions on the script file itself. Make sure it is executable by the Apache system user.

Link to comment
Share on other sites

Check your Perl script for syntax errors. The error message suggests that to me. Also, double-check the permissions on the script file itself. Make sure it is executable by the Apache system user.
The permissions on the script file itself (awstat.pl) is
-rwxr-xr-x  1 root root 527395 Feb 26  2005 awstats.pl

I have checked the apache folder, as such /var/www, which is 755 and root.root for html directory. I would like to know whether apache is running by root or user apache? I check ps axu|grep httpd is running as apache user but I start the deamon and all directories related to httpd is owned by root.root. How come like tis?Let say I change to apache user to my perl script. Then I should start changing from /usr/local/awstats only or /usr?Please advise...

Link to comment
Share on other sites

Let say I change to apache user to my perl script. Then I should start changing from /usr/local/awstats only or /usr?
Are you sure there is an "apache user" ? Please check "cat /etc/group":angry: Bruno
Link to comment
Share on other sites

Are you sure there is an "apache user" ? Please check "cat /etc/group":angry: Bruno
I run ps aux|grep httpd is showing apache and cat /etc/group |grep apache as below
apache:x:48:

But I try to change own to apache of my perl script then it still got the 500 Internal Server Error. I wonder wether is the problem of documentroot path /var/www/html so I setup a virtual host for it with documentroot path /usr/local/awstats/wwwroot/ then I browse the http://localhost/ it perfectly show me the 4 directories I have inside the /usr/local/awstats/wwwroot/ but once I click on one of them, it show Forbidden in browser. I really do not know what is wrong here? please advise...

Link to comment
Share on other sites

Apache's parent process runs as root but it doesn't do any of the serving of pages, it just calls up child processes that run as the apache user. At least that's how I understand it. Not sure if that helps you any though.

Link to comment
Share on other sites

Hi All, I am very frustrated on the permission denied exec of /usr/local/awstats/wwwroot/awstats.pl I have tried a lot of the possible solution, as such change ownership, modify httpd.conf but I still get 403 Forbidden page on my browser.

Link to comment
Share on other sites

Hi All, I am very frustrated on the permission denied exec of /usr/local/awstats/wwwroot/awstats.pl I have tried a lot of the possible solution, as such change ownership, modify httpd.conf but I still get 403 Forbidden page on my browser.
I just noticed something. Doesn't the perl script have to be in a cgi-bin directory for apache to execute it?Thinking maybe this page might help you in troubleshooting in any case. Let us know what was wrong if you can figure it out.http://perl.about.com/od/debuggingandsecur...l/aa080901a.htm
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...