Score:0

Issue with VirtualHost settings in Apache2.2 leading to 503 varnish cache error

cn flag

<VirtualHost 127.0.0.1:80> ServerName staging02.cherry.com

ServerAlias www.staging02.cherry.com 



DocumentRoot /home/staging02/version/www.staging02.cherry.com
ServerAdmin [email protected]

SetEnv environment prod
SetEnv project staging02

UseCanonicalName Off
#CustomLog /var/log/httpd/staging02.cherry.com_log combined
#CustomLog /var/log/httpd/staging02.cherry.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."

## User cherry # Needed for Cpanel::ApacheConf
UserDir disabled
UserDir enabled staging02

  #<IfModule mod_suphp.c>
#    suPHP_UserGroup staging02 staging02
#</IfModule>

SuexecUserGroup staging02 staging02

<directory "/home/staging02/version">
    AddHandler php5-fcgi .php
    Action php5-fcgi /php5-fcgi-staging02
    AllowOverride All

    
</directory>
<IfModule concurrent_php.c>
    php5_admin_value open_basedir "/home/staging02:/usr/lib/php:/usr/local/lib/php:/tmp"
</IfModule>
<IfModule !concurrent_php.c>
    <IfModule mod_php5.c>
        php_admin_value open_basedir "/home/staging02:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>
    <IfModule sapi_apache2.c>
        php_admin_value open_basedir "/home/staging02:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
    </IfModule>
</IfModule>
<IfModule !mod_disable_suexec.c>
    <IfModule !mod_ruid2.c>
        SuexecUserGroup staging02 staging02
    </IfModule>
</IfModule>
<IfModule mod_ruid2.c>
    RMode config
    RUidGid staging02 staging02
</IfModule>
<IfModule itk.c>
    # For more information on MPM ITK, please read:
    #   http://mpm-itk.sesse.net/
    AssignUserID staging02 staging02
</IfModule>
I replaced this with:
<VirtualHost 127.0.0.1:80>
ServerAdmin root@localhost
DocumentRoot /var/www/html
ServerName staging02.cherry.com
</VirtualHost>

And I was suddenly able to get the default Apache page instead of 503 varnish error, and I was able to go to staging02.cherry.com/test.php. So I am thinking there's something wrong with the above config. What can I remove in that config and what values should I enter? I am thinking ServerAdmin is wrong, I should change the IP address among other things, but I am not sure if it would work. Should I remove all ifModule configs? If it worked with simpler VirtualHost settings can we rule out a problem with php-fpm and fcgi?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.