Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an externally started FastCGI application that listens on socket '/tmp/foo.sock' and a directory of static files in '/srv/static'. Apache has all needed permissions on the socket and the directories.

What I need : All requests starting with '/static' should be handled by apache using the contents of '/srv/static'. All other requests should be handled by the FastCGI application. Here is my current virtual host configuration:

<VirtualHost *:80>

        Alias /static /srv/static

        FastCgiExternalServer /* -socket /tmp/foo.sock    

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined


Even though this seems simple, its giving me quite the headache. According to the first parameter to 'FastCgiExternalServer' should be a 'filename' that when matched will cause apache to delegate the request to the external FastCGI app. What am I missing here?

share|improve this question

According to the FastCGI FAQ, change the FastCgiExternalServer line to the belows

FastCgiExternalServer /srv/static -socket /tmp/foo.sock 

and try again.

share|improve this answer

The first argument to FastCgiExternalServer is supposed to be some file name that will redirect. It doesn't have to exist. It doesn't say that a wildcard is supported. I don't think that using /srv/static is the right answer, you want that handled by Apache.

share|improve this answer

Your Answer


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.