Jump to content


Http Problem!!


  • Please log in to reply
7 replies to this topic

#1 OFFLINE   lewkh

lewkh

    Post Master

  • Members
  • PipPipPipPip
  • 120 posts

Posted 27 September 2005 - 05:54 AM

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

#2 OFFLINE   Peachy

Peachy

    Anarquista De Sartorial

  • Forum Moderators
  • 5,448 posts

Posted 27 September 2005 - 09:03 AM

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.

'freedom...is actually the reason that men live together in political organisations at all. Without it, political life as such would be meaningless. The raison d'Être of politics is freedom, and its field of experience is action'.
My Flickr Photo Blog Posted Image
del.icio.us bookmarks Posted Image


#3 OFFLINE   lewkh

lewkh

    Post Master

  • Members
  • PipPipPipPip
  • 120 posts

Posted 29 September 2005 - 12:15 AM

View PostPeachy, on Sep 27 2005, 09:03 PM, said:

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...

#4 OFFLINE   Bruno

Bruno

    Le Professeur Pingouin

  • Admin Emeritus
  • 37,904 posts

Posted 29 September 2005 - 04:04 AM

View Postlewkh, on Sep 29 2005, 06:15 AM, said:

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

#5 OFFLINE   lewkh

lewkh

    Post Master

  • Members
  • PipPipPipPip
  • 120 posts

Posted 29 September 2005 - 05:11 AM

View PostBruno, on Sep 29 2005, 04:04 PM, said:

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...

#6 OFFLINE   linuxdude32

linuxdude32

    Board Bigwig

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,702 posts

Posted 29 September 2005 - 06:44 AM

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.
Jason Wallwork

#7 OFFLINE   lewkh

lewkh

    Post Master

  • Members
  • PipPipPipPip
  • 120 posts

Posted 29 September 2005 - 06:55 AM

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.

#8 OFFLINE   linuxdude32

linuxdude32

    Board Bigwig

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,702 posts

Posted 29 September 2005 - 07:34 AM

View Postlewkh, on Sep 29 2005, 06:55 AM, said:

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.co...l/aa080901a.htm
Jason Wallwork




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users