Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a really strange problem. I am using Apache2 and I have set up a VirtualHost. And it is working, but after a couple of request (4-5), I am getting 403 error. After I wait 10-20 seconds, the page starts to work again.

Here is my VirtualHost record.

<VirtualHost *:80>
    ServerAdmin info@the-host.com
    ServerName subdomain.the-host.com

    DocumentRoot /var/www/vhosts/subdomain.the-host.com/current/web

    ErrorLog        /var/log/apache2/subdomain.the-host.com-error.log
    CustomLog       /var/log/apache2/subdomain.the-host.com-access.log combined

    <Directory /var/www/vhosts/subdomain.the-host.com/current/web>
        Options +ExecCGI

        AllowOverride All
        Allow from all
    </Directory>

    LogLevel warn
    ServerSignature On
</VirtualHost>

The directory has www-data:www-data owner ship

Here are the errors from the log

[Tue May 21 15:14:57 2013] [warn] [client 111.111.111.111] mod_fcgid: stderr: Empty module and/or action after parsing the URL "/favicon.ico" (/).
[Tue May 21 15:14:58 2013] [warn] [client 111.111.111.111] mod_fcgid: stderr: Empty module and/or action after parsing the URL "/favicon.ico" (/).
[Tue May 21 15:14:58 2013] [warn] [client 111.111.111.111] mod_fcgid: stderr: Empty module and/or action after parsing the URL "/favicon.ico" (/).
[Tue May 21 15:14:59 2013] [warn] [client 111.111.111.111] mod_fcgid: stderr: Empty module and/or action after parsing the URL "/favicon.ico" (/).
[Tue May 21 15:14:59 2013] [error] [client 111.111.111.111] client denied by server configuration: /var/www/vhosts/subdomain.the-host.com/current/web/favicon.ico
[Tue May 21 15:14:59 2013] [error] [client 111.111.111.111] client denied by server configuration: /var/www/vhosts/subdomain.the-host.com/current/web/favicon.ico
[Tue May 21 15:14:59 2013] [warn] [client 111.111.111.111] mod_fcgid: stderr: Empty module and/or action after parsing the URL "/favicon.ico" (/).
[Tue May 21 15:14:59 2013] [error] [client 111.111.111.111] client denied by server configuration: /var/www/vhosts/subdomain.the-host.com/current/web/favicon.ico
[Tue May 21 15:14:59 2013] [error] [client 111.111.111.111] client denied by server configuration: /var/www/vhosts/subdomain.the-host.com/current/web/es, referer: http://subdomain.the-host.com/es/leatid
[Tue May 21 15:15:00 2013] [error] [client 111.111.111.111] client denied by server configuration: /var/www/vhosts/subdomain.the-host.com/current/web/favicon.ico
[Tue May 21 15:15:00 2013] [warn] [client 111.111.111.111] mod_fcgid: stderr: Empty module and/or action after parsing the URL "/favicon.ico" (/).
[Tue May 21 15:15:00 2013] [warn] [client 111.111.111.111] mod_fcgid: stderr: Empty module and/or action after parsing the URL "/favicon.ico" (/).

Any ideas why apache fails after 4-5 requests?

share|improve this question
    
What error is posted in the logs? –  NickW May 21 '13 at 12:09
    
I have added the errors to the question –  Mirko Akov May 21 '13 at 12:20
    
Define directory index directive .DirectoryIndex index.html index.cgi index.pl index.php index.xhtml –  Abhishek Anand Amralkar May 21 '13 at 12:20
    
Also check for correct directory permissions. –  Abhishek Anand Amralkar May 21 '13 at 12:21
    
I have tested it with DirectoryIndex index.php, but I get the same error after 5-6 requests and my permissions are -rw-rw-r-- 1 www-data www-data –  Mirko Akov May 21 '13 at 12:24

1 Answer 1

Probably your mod_fcgid backend processes died immediately after request is finished. It's not a normal situation, so you need to find what is the root cause of dying fcgi, maybe some error in a script? I guess it's related to action with /favicon.ico, maybe your script can't handle 404 errors properly or sth like that.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.