Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
2.4 KiB

4 years ago
upstream factory_servers {
4 years ago
#ip_hash;
server 127.0.0.1:8080;
#server readmongo:3000;
4 years ago
keepalive 64;
}
proxy_cache_path /var/tmp levels=1:2 keys_zone=my_cache:10m max_size=10g inactive=60m use_temp_path=off;
resolver_timeout 5s;
server {
listen 80;
listen [::]:80 ipv6only=on;
server_name factory.swarmlab.io;
return 301 https://factory.swarmlab.io$request_uri;
}
server {
listen [::]:443 ssl ipv6only=off;
server_name factory.swarmlab.io;
4 years ago
root /home/node/swarmlab-app/dist;
4 years ago
# To allow special characters in headers
ignore_invalid_headers off;
# Allow any size file to be uploaded.
# Set to a value such as 1000m; to restrict file size to a specific value
client_max_body_size 0;
# To disable buffering
4 years ago
# proxy_buffering off;
4 years ago
ssl_certificate /etc/nginx/fullchain.pem;
ssl_certificate_key /etc/nginx/key.private.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
# # Requests for socket.io are passed on to Node on port 3000
# location ~* \.io {
# 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 false;
#
# proxy_pass http://factory_servers;
# proxy_redirect off;
#
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
# }
location / {
4 years ago
index index.html;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header Host $http_host;
# proxy_set_header X-NginX-Proxy false;
#
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
#
# #set $originaddr http://factory_servers;
# #proxy_pass $originaddr;
## or even
## proxy_pass http://origin.example.com$request_uri;
#
# proxy_pass http://factory_servers$request_uri;
#
## proxy_pass http://factory_servers;
## proxy_pass http://$host;
#
# proxy_redirect off;
# proxy_read_timeout 240s;
4 years ago
}
}