500 Internal Server Error (Ubuntu)

Discussion in 'Installation/Configuration' started by Sk89r, Dec 23, 2013.

  1. Sk89r

    Sk89r New Member

    First of all I would just like to state that I am nowhere near "skilled" in Linux im still learning so please be patient with me. A few days ago I installed ISPconfig and it was working great! A few days after the installation I suddenly got this error when trying to access the site I made or the ISPconfig panel

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    I've checked the error logs and the common issues checker heres what I got

    /var/log/apache2/suexec.log
    [2013-12-23 15:44:08]: uid: (5003/ispconfig) gid: (5004/ispconfig) cmd: .php-fcgi-starter
    [2013-12-23 15:44:08]: file is writable by others: (/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter)
    I tried to fix the filer is writable issue with the following commands
    chmod o-w /var/www/php-fcgi-scripts/ispconfig

    chmod 755 /var/www/php-fcgi-scripts/ispconfig

    /var/log/apache2/error.log
    [Mon Dec 23 15:44:07 2013] [warn] [client xx.xxx.xx.xx] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
    [Mon Dec 23 15:44:07 2013] [error] [client xx.xxx.xx.xx] Premature end of script headers: index.php

    script for common issues results
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] ISPConfig is installed.

    ##### ISPCONFIG #####
    ISPConfig version is 3.0.5.3


    ##### VERSION CHECK #####

    [INFO] php (cli) version is 5.3.10-1ubuntu3.9

    ##### PORT CHECK #####


    ##### MAIL SERVER CHECK #####


    ##### RUNNING SERVER PROCESSES #####

    [INFO] I found the following web server(s):
    Apache 2 (PID 10780)
    [INFO] I found the following mail server(s):
    Postfix (PID 9847)
    [INFO] I found the following pop3 server(s):
    Dovecot (PID 10745)
    [INFO] I found the following imap server(s):
    Dovecot (PID 10745)
    [INFO] I found the following ftp server(s):
    PureFTP (PID 10798)

    ##### LISTENING PORTS #####
    (only ()
    Local (Address)
    [localhost]:953 (10825/named)
    [anywhere]:25 (9847/master)
    [anywhere]:993 (10745/dovecot)
    [anywhere]:995 (10745/dovecot)
    [localhost]:10024 (5965/amavisd)
    [localhost]:9000 (1331/php-fpm.conf))
    [localhost]:10025 (9847/master)
    [anywhere]:3306 (9525/mysqld)
    [anywhere]:587 (9847/master)
    [localhost]:11211 (1311/memcached)
    [anywhere]:110 (10745/dovecot)
    [anywhere]:143 (10745/dovecot)
    [localhost]:8080 (10780/apache2)
    [anywhere]:10000 (1675/perl)
    [anywhere]:465 (9847/master)
    ***.***.***.***:53 (10825/named)
    [localhost]:53 (10825/named)
    [anywhere]:21 (10798/pure-ftpd)
    [anywhere]:22 (361/sshd)
    *:*:*:*::*:953 (10825/named)
    *:*:*:*::*:25 (9847/master)
    *:*:*:*::*:443 (10780/apache2)
    *:*:*:*::*:993 (10745/dovecot)
    *:*:*:*::*:995 (10745/dovecot)
    [localhost]515 (10780/apache2)
    *:*:*:*::*:587 (9847/master)
    [localhost]10 (10745/dovecot)
    [localhost]43 (10745/dovecot)
    *:*:*:*::*:80 (10780/apache2)
    *:*:*:*::*:8081 (10780/apache2)
    *:*:*:*::*:465 (9847/master)
    *:*:*:*::*:53 (10825/named)
    *:*:*:*::*:21 (10798/pure-ftpd)
    *:*:*:*::*:22 (361/sshd)




    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target prot opt source destination

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination

    Thank you in advance for even considering to help :)
     
  2. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Please check the php.ini in /etc/php5/cgi/php.ini
    Try to rename it to php.ini.save and restart Apache.
    If the error is gone, there seems to be an error inside the ini file.

    Check the /usr/lib/apache2/suexec executable for it's rights.
     
  3. Sk89r

    Sk89r New Member

    I did as you told me but sadly didnt help heres what my suexec.log looks like now

    [2013-12-26 08:27:45]: directory is writable by others: (/var/www/php-fcgi-scripts/web1)
    [2013-12-26 08:27:47]: uid: (5003/ispconfig) gid: (5004/ispconfig) cmd: .php-fcgi-starter
    [2013-12-26 08:27:47]: file is writable by others: (/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter)
    [2013-12-26 08:51:26]: uid: (5003/ispconfig) gid: (5004/ispconfig) cmd: .php-fcgi-starter
    it keeps saying both of those directories are writeable i used chmod 775 to fix it but it didnt work
     
  4. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Have you tried
    Code:
    chmod -R o-w /var/www/php-fcgi-scripts
     
  5. Sk89r

    Sk89r New Member

    I just tried it sadly it didnt work still the same error
    [2013-12-26 15:06:15]: uid: (5004/web1) gid: (5005/client0) cmd: .php-fcgi-starter
    [2013-12-26 15:06:15]: directory is writable by others: (/var/www/php-fcgi-scripts/web1)
    [2013-12-26 15:06:19]: uid: (5003/ispconfig) gid: (5004/ispconfig) cmd: .php-fcgi-starter
    [2013-12-26 15:06:19]: file is writable by others: (/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter)
     
  6. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    What about the "ls -l" of these files and directories?
     
  7. Sk89r

    Sk89r New Member

    [email protected]:/var/www/php-fcgi-scripts# ls -l
    total 12
    drwxrwxr-x 2 ispapps ispapps 4096 Dec 22 07:31 apps
    drwxr-xr-x 2 ispconfig ispconfig 4096 Dec 22 07:32 ispconfig
    drwxrwxr-x 2 web1 client0 4096 Dec 22 08:11 web1
     
  8. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Have you tried removing group-write?
    Code:
    chmod -R g-w /var/www/php-fcgi-scripts
     
  9. Sk89r

    Sk89r New Member

    It worked! Thank you very much! :)
     

Share This Page