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

I have a working Nginx config for a static HTML site. I need to add a forum at http://blah.com/forum, 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

Thanks!

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

1 Answer 1

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

 
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.