diff --git a/conf/nginx.conf b/conf/nginx.conf index 16ae586..86a0993 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,11 +1,14 @@ location / { - proxy_pass http://localhost:__PORT__/; - proxy_set_header Host $host; - proxy_buffering off; - fastcgi_param REMOTE_USER $remote_user; - client_max_body_size 50M; + proxy_pass http://127.0.0.1:__PORT__; + proxy_redirect off; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $server_name; - # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; -} + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; + more_clear_input_headers 'Accept-Encoding'; +} \ No newline at end of file diff --git a/conf/systemd.service b/conf/systemd.service index cf0cce7..d8899eb 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -9,10 +9,8 @@ Group=__APP__ WorkingDirectory=__FINALPATH__ Environment="PATH=__ENV_PATH__" Environment="NODE_ENV=production" -ExecStart=__YNH_NPM__ server.js --port __PORT__ +ExecStart=__YNH_NPM__ server.js --server:port=__PORT__ Restart=always [Install] WantedBy=multi-user.target - -#node server.js --server:port=80 \ No newline at end of file