Browse Source

dist

master
zeus 4 years ago
parent
commit
d37862a998
  1. 22
      ecosystem.config.js
  2. 46
      nginx/swarmlab-stats-proxy-server.conf

22
ecosystem.config.js

@ -1,27 +1,7 @@
module.exports = { module.exports = {
"apps": [ "apps": [
{ {
"name" : "nodejsclient", "name" : "www",
"autorestart" : true,
"watch" : true,
"cwd" : "/home/node/swarmlab-app",
"script" : "npm run serve",
"run_as_user" : "node",
"args" : "start",
"pid_file" : "/home/node/run/pid.pid",
"log_type" : "json",
"log_file" : "/home/node/logs/logfile",
"error_file" : "/home/node/logs/errorfile",
"out_file" : "/home/node/logs/outfile",
"log_date_format": "YYYY-MM-DD HH:mm Z",
"merge_logs" : true,
"exec_mode" : "fork",
"max_restarts": 10,
"max_memory_restart": "500M",
"restart_delay": 1000
},
{
"name" : "nodejsproxy",
"autorestart" : true, "autorestart" : true,
"watch" : true, "watch" : true,
"cwd" : "/home/node/swarmlab-app", "cwd" : "/home/node/swarmlab-app",

46
nginx/swarmlab-stats-proxy-server.conf

@ -17,6 +17,7 @@ server {
server { server {
listen [::]:443 ssl ipv6only=off; listen [::]:443 ssl ipv6only=off;
server_name factory.swarmlab.io; server_name factory.swarmlab.io;
root /home/node/swarmlab-app/dist;
# To allow special characters in headers # To allow special characters in headers
ignore_invalid_headers off; ignore_invalid_headers off;
@ -25,7 +26,7 @@ server {
# Set to a value such as 1000m; to restrict file size to a specific value # Set to a value such as 1000m; to restrict file size to a specific value
client_max_body_size 0; client_max_body_size 0;
# To disable buffering # To disable buffering
proxy_buffering off; # proxy_buffering off;
ssl_certificate /etc/nginx/fullchain.pem; ssl_certificate /etc/nginx/fullchain.pem;
ssl_certificate_key /etc/nginx/key.private.pem; ssl_certificate_key /etc/nginx/key.private.pem;
@ -49,27 +50,28 @@ server {
# } # }
location / { location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; index index.$geo.html index.htm index.html;
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-Real-IP $remote_addr;
proxy_set_header X-NginX-Proxy false; # 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_http_version 1.1;
proxy_set_header Connection "upgrade"; # proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
#set $originaddr http://factory_servers; #
#proxy_pass $originaddr; # #set $originaddr http://factory_servers;
# or even # #proxy_pass $originaddr;
# proxy_pass http://origin.example.com$request_uri; ## or even
## proxy_pass http://origin.example.com$request_uri;
proxy_pass http://factory_servers$request_uri; #
# proxy_pass http://factory_servers$request_uri;
# proxy_pass http://factory_servers; #
# proxy_pass http://$host; ## proxy_pass http://factory_servers;
## proxy_pass http://$host;
proxy_redirect off; #
proxy_read_timeout 240s; # proxy_redirect off;
# proxy_read_timeout 240s;
} }

Loading…
Cancel
Save