Error with suphp enabled

Discussion in 'Server Operation' started by robertlouwen, Jul 19, 2010.

  1. robertlouwen

    robertlouwen New Member

    Error with suexec enabled

    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.pl?config=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 ....
     

    Attached Files:

    Last edited: Jul 19, 2010
  2. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Any errors in Apache's error log?
     
  3. robertlouwen

    robertlouwen New Member

    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
     

    Attached Files:

  4. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    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 ~]#
     
  5. robertlouwen

    robertlouwen New Member

    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 ?
     

    Attached Files:

  6. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

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

Share This Page