Can't start Apache after Ubuntu Upgrade

Discussion in 'General' started by mhpcomputerservices, May 24, 2010.

  1. Hello

    I have upgraded Ubuntu on my secondary server 9.10 -> 10.04LTS

    All seems good, however I do have one small problem.

    When a site is configured to use Fast-CGI apache refuses to start with the error:

    Code:
     * Starting web server apache2    
    Syntax error on line 58 of /etc/apache2/sites-enabled/testing.mhphosting.co.uk.vhost:                                                                                                                                                                                                   
    SocketPath cannot occur within <VirtualHost> section
    If the website is configured to use SuPHP or any other PHP handler this is not a problem. (Although - I'm not totally convinced suPHP is working either because PHPInfo shows 'Server API: Apache 2.0 Handler' ??)

    Searching around only gives me bits of information and no solutions.

    There seem to be some suggestions that it is an incompatibility with the new libapache2-mod-fcgid Version: 1:2.3.4-2.

    Others suggest it is because my apache configuration was not updated during the upgrade.

    As I have only upgraded my secondary server this is not a huge problem yet, the sites that require Fast-CGI are housed on the primary so I shall hold off upgrading that for now.

    Here is one of the offending vhost files.

    Code:
    cat testing.mhphosting.co.uk.vhost
    <Directory /var/www/testing.mhphosting.co.uk>
        AllowOverride None
        Order Deny,Allow
        Deny from all
    </Directory>
    
    <VirtualHost *:80>
          DocumentRoot /var/www/testing.mhphosting.co.uk/web
    
        ServerName testing.mhphosting.co.uk
        ServerAdmin [email protected]
    
        ErrorLog /var/log/ispconfig/httpd/testing.mhphosting.co.uk/error.log
    
        ErrorDocument 400 /error/400.html
        ErrorDocument 401 /error/401.html
        ErrorDocument 403 /error/403.html
        ErrorDocument 404 /error/404.html
        ErrorDocument 405 /error/405.html
        ErrorDocument 500 /error/500.html
        ErrorDocument 503 /error/503.html
    
        <Directory /var/www/testing.mhphosting.co.uk/web>
            Options FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
    
            # ssi enabled
            AddType text/html .shtml
            AddOutputFilter INCLUDES .shtml
            Options +Includes
        </Directory>
        <Directory /var/www/clients/client1/web55/web>
            Options FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
    
            # ssi enabled
            AddType text/html .shtml
            AddOutputFilter INCLUDES .shtml
            Options +Includes
        </Directory>
    
        # cgi enabled
            <Directory /var/www/clients/client1/web55/cgi-bin>
          Order allow,deny
          Allow from all
        </Directory>
        ScriptAlias  /cgi-bin/ /var/www/clients/client1/web55/cgi-bin/
        AddHandler cgi-script .cgi
        AddHandler cgi-script .pl
        # suexec enabled
        SuexecUserGroup web55 client1
        # php as fast-cgi enabled
        <IfModule mod_fcgid.c>
          SocketPath /tmp/fcgid_sock/
          IdleTimeout 3600
          ProcessLifeTime 7200
          MaxProcessCount 1000
          DefaultMinClassProcessCount 3
          DefaultMaxClassProcessCount 100
          IPCConnectTimeout 8
          IPCCommTimeout 360
          BusyTimeout 300
        </IfModule>
        <Directory /var/www/testing.mhphosting.co.uk/web>
            AddHandler fcgid-script .php .php3 .php4 .php5
            FCGIWrapper /var/www/php-fcgi-scripts/web55/.php-fcgi-starter .php
            Options +ExecCGI
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
            <Directory /var/www/clients/client1/web55/web>
            AddHandler fcgid-script .php .php3 .php4 .php5
            FCGIWrapper /var/www/php-fcgi-scripts/web55/.php-fcgi-starter .php
            Options +ExecCGI
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
    
        # add support for apache mpm_itk
        <IfModule mpm_itk_module>
          AssignUserId web55 client1
        </IfModule>
    
    
    </VirtualHost>
    
    So it seems this is the line it's complaining about:
    Code:
    SocketPath /tmp/fcgid_sock/
    Please has anyone got any ideas here?

    Thanks
     
  2. OK, following on from my own post. I'm not sure *why* this has happened but this is how I've got round it:

    EDIT /usr/local/ispconfig/server/conf/vhost.conf.master

    Find:
    Code:
    SocketPath /tmp/fcgid_sock/
          
    MaxProcessCount 1000

    Change to:
    Code:
    # SocketPath /tmp/fcgid_sock/
          
    # MaxProcessCount 1000
    Then, via ISPConfig - disable PHP for all sites with Fast-CGI enabled, Save and then re-enable Fast-CGI.

    Code:
    /etc/init.d/apache2 restart.
    Apache should then start normally.
     
  3. jonhattan

    jonhattan New Member

Share This Page