-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Sample Code Block
http {
upstream my_nodejs_upstream {
server 127.0.0.1:3000;
keepalive 64;
}
server {
listen 80;
server_name example.com;
#root /home/www/project_root;
#return 301 $scheme://example.com$request_uri;
if ($host !~ '^[a-zA-Z0-9]*.{0,}example.com$') {
return 403;
#return 301 $scheme://example.com$request_uri;
}
location / {
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_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_max_temp_file_size 0;
proxy_pass http://my_nodejs_upstream/;
proxy_redirect off;
proxy_read_timeout 240s;
}
}
}
Rendered As Below
Metadata
Metadata
Assignees
Labels
No labels