Last active
March 21, 2017 07:21
-
-
Save inuvalogic/d0f1eb49db75db238dd2154cdaf46ee5 to your computer and use it in GitHub Desktop.
konfigurasi php & node pada 1 server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /etc/nginx/sites-available/example.com | |
| server { | |
| listen 80 default_server; | |
| listen [::]:80 default_server ipv6only=on; | |
| root /usr/share/nginx/html/php; | |
| index index.php index.html index.htm; | |
| server_name example.com; | |
| location / { | |
| try_files $uri $uri/ =404; | |
| } | |
| error_page 404 /404.html; | |
| error_page 500 502 503 504 /50x.html; | |
| location = /50x.html { | |
| root /usr/share/nginx/html; | |
| } | |
| location ~ \.php$ { | |
| try_files $uri =404; | |
| fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
| fastcgi_pass unix:/var/run/php5-fpm.sock; | |
| fastcgi_index index.php; | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| include fastcgi_params; | |
| } | |
| } | |
| server { | |
| listen 80; | |
| listen [::]:80 ipv6only=on; | |
| server_name node.example.com; | |
| root /usr/share/nginx/html/node; | |
| index index.html index.htm; | |
| client_max_body_size 10G; | |
| location / { | |
| proxy_pass http://localhost:2368; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header Host $http_host; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| proxy_buffering off; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment