Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user nginx;
- worker_processes auto;
- error_log /var/log/nginx/error.log;
- pid /run/nginx.pid;
- # Load dynamic modules. See /usr/share/nginx/README.dynamic.
- include /usr/share/nginx/modules/*.conf;
- events {
- worker_connections 1024;
- }
- http {
- log_format main '$remote_addr - $remote_user [$time_local] "$request"
- '
- '$status $body_bytes_sent "$http_referer" '
- '"$http_user_agent" "$http_x_forwarded_for"';
- access_log /var/log/nginx/access.log main;
- sendfile on;
- tcp_nopush on;
- tcp_nodelay on;
- keepalive_timeout 65;
- types_hash_max_size 2048;
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
- include /etc/nginx/conf.d/*.conf;
- }
- upstream node_server {
- server 127.0.0.1:3000 fail_timeout=0;
- }
- server {
- listen 80;
- server_name website-one.com;
- index index.html index.htm;
- access_log /var/log/webone/access.log;
- error_log /var/log/webone/error.log debug;
- location / {
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_redirect off;
- proxy_buffering off;
- proxy_pass http://node_server;
- }
- location /public/ {
- root /opt/website-one;
- }
- }
- server {
- listen 80;
- server_name website-two.com;
- access_log /var/log/webtwo/access.log;
- error_log /var/log/webtwo/error.log debug;
- index index.php index.html index.htm;
- location / {
- root /var/www/;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement