Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this is my actual nginx vhost. i is serving as a proxy for a node.js app
- server {
- listen 80;
- server_name www.domain.com domain.com;
- access_log /home/user101/unic/logs/access.log;
- error_log /home/user101/unic/logs/error.log;
- location / {
- root /home/user101/unic;
- index index.html index.htm;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Host $http_host;
- proxy_set_header X-NginX-Proxy true;
- proxy_pass http://172.38.421.49:3000/;
- proxy_redirect off;
- }
- }
- ---------------------------------------------------------------------------------
- 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$?
- # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
- #
- location ~ \.php$ {
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;
- include fastcgi_params;
- }
- ----------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement