View difference between Paste ID: TssrJW2u and 447QzZuK
SHOW: | | - or go back to the newest paste.
1
2
this is my actual nginx vhost. i is serving as a proxy for a node.js app
3
server {
4
    listen   80;
5
    server_name www.domain.com domain.com;
6
    access_log /home/user101/unic/logs/access.log;
7
    error_log /home/user101/unic/logs/error.log;
8
9
    location / {
10
       root  /home/user101/unic;
11
       index  index.html index.htm;
12
       proxy_set_header X-Real-IP $remote_addr;
13
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
14
       proxy_set_header Host $http_host;
15
       proxy_set_header X-NginX-Proxy true;
16
       proxy_pass http://172.38.421.49:3000/;
17
       proxy_redirect off;
18
    }
19
}
20-
i want to add php fast cgi, where this should go?
20+
21
---------------------------------------------------------------------------------
22
i want to add php fast cgi, but i'm confused with  location ~ \.php$. if i have already  location /  in my original vhost, should i just add the below  code without location ~ \.php$?
23
24
 # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
25
        #
26
        location ~ \.php$ {
27
                fastcgi_pass   127.0.0.1:9000;
28
                fastcgi_index  index.php;
29-
        }
29+
30
                include fastcgi_params;
31
        }
32
----------------------------------------------------------------------------------