Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 a working Nginx config for a static HTML site. I need to add a forum at, php-fpm is installed and working as a unix socket (I have tested and got this working via a test sub domain). But I can't get /forum to work, could someone post a working php-fpm config that will work in a sub dir?

Currently my site resides at /usr/share/nginx/html/ and my forum will be /usr/share/nginx/html/forum


share|improve this question
What have you tried? – Michael Hampton Feb 16 '13 at 19:33

You need to tell your Nginx to fastcgi_pass the forum requests to your PHP backend. That's an example:

location /forum {
    root /usr/share/nginx/html/forum;
    include /etc/nginx/fastcgi_params;
    fastcgi_index index.php;
    fastcgi_pass unix:/tmp/php-fpm.socket;
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.