HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Error with suphp enabled (http://www.howtoforge.com/forums/showthread.php?t=47411)

robertlouwen 19th July 2010 03:06

Error with suexec enabled
 
2 Attachment(s)
Hello all,

In ISPConfig I have suexec enabled for my server and everything is working perfect.
However, I have two statistic - pages in /usr/share/* and they give with suexec enabled "error 500". With suexec disabled there are no errors.

The first page is located in /usr/share/mailgraph and is called in a browser with http://www.domain.nu/mailgraph
For this I use the attached mailgraph.conf wich is located in /etc/htpd/conf.d

The second page is located in /usr/share/awstats/* and is called in a browser with http://www.domain.nu/awstats/awstats...=www.domain.nu
Awstats adjusted the httpd.conf file during config ( see attached httpd.conf file )

Is there a way that suexec makes an exception for those two pages (directories) ? I prefer suexec enabled for my server.
Or do I have to change ownership to apache:apache ?

Help would be appreciated ....

falko 19th July 2010 13:37

Any errors in Apache's error log?

robertlouwen 19th July 2010 14:17

4 Attachment(s)
Hello Falko,

Attached some error log ...

location is included in file name i.e. var-log-httpd-error_log = /var/log/httpd/error_log

Have a nice day

falko 20th July 2010 14:04

Quote:

[2010-07-19 13:31:19]: command not in docroot (/usr/share/mailgraph/mailgraph.cgi)
The problem is that mailgrpah is outside the document root.

Run
Code:

/usr/sbin/suexec -V
and you should see that suExec's docroot is /var/www:

Code:

[root@server1 ~]# /usr/sbin/suexec -V
 -D AP_DOC_ROOT="/var/www"
 -D AP_GID_MIN=100
 -D AP_HTTPD_USER="apache"
 -D AP_LOG_EXEC="/var/log/httpd/suexec.log"
 -D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
 -D AP_UID_MIN=500
 -D AP_USERDIR_SUFFIX="public_html"
[root@server1 ~]#


robertlouwen 23rd July 2010 08:32

2 Attachment(s)
Hello Falko,
Code:

/usr/sbin/suexec -V
gives excactly what you said, so I moved mailgraph.cgi and mailgraph.css to /var/www
Also I changed /etc/httpd/conf.d/mailgraph.conf and restarted httpd.
Still I get errors; error 500 or error 403.

The error change when I change owner/group properties and when I change file permissions

How important is it to have suexec enabled for my websites ?

falko 24th July 2010 12:25

I think you must move the scripts inside your web site because otherwise they are outside of your vhost user's home directory.


All times are GMT +2. The time now is 20:29.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.