chore: update nginx and controller services
This commit is contained in:
parent
f9042ea2fc
commit
790463234c
|
|
@ -2,7 +2,7 @@
|
|||
Description=TR-369 Controller
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/controller -u 'root' -P '<password to broker>' -mongo '<mongoDB address>' -p 8883 -tls
|
||||
ExecStart=/usr/bin/controller -u 'root' -P '<password to broker>' -mongo '<mongoDB address>' -ap 8001
|
||||
|
||||
Restart=always
|
||||
RestartSec=4
|
||||
|
|
|
|||
|
|
@ -35,51 +35,59 @@ http {
|
|||
include /etc/nginx/conf.d/*.conf;
|
||||
|
||||
server {
|
||||
if ($host = oktopus.ifsc.digital) {
|
||||
if ($host = oktopustr369.com) {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name oktopus.ifsc.digital;
|
||||
server_name oktopustr369.com;
|
||||
return 404;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name oktopus.ifsc.digital;
|
||||
root /usr/share/nginx/html;
|
||||
listen 443 http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name oktopustr369.com;
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
# Load configuration files for the default server block.
|
||||
include /etc/nginx/default.d/*.conf;
|
||||
# Load configuration files for the default server block.
|
||||
include /etc/nginx/default.d/*.conf;
|
||||
|
||||
ssl_certificate "/etc/letsencrypt/live/oktopus.ifsc.digital/fullchain.pem";
|
||||
ssl_certificate_key "/etc/letsencrypt/live/oktopus.ifsc.digital/privkey.pem";
|
||||
ssl_session_cache shared:SSL:1m;
|
||||
ssl_session_timeout 10m;
|
||||
ssl_ciphers PROFILE=SYSTEM;
|
||||
ssl_prefer_server_ciphers on;
|
||||
ssl_certificate "/etc/letsencrypt/live/oktopustr369.com/fullchain.pem";
|
||||
ssl_certificate_key "/etc/letsencrypt/live/oktopustr369.com/privkey.pem";
|
||||
ssl_session_cache shared:SSL:1m;
|
||||
ssl_session_timeout 10m;
|
||||
ssl_ciphers PROFILE=SYSTEM;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
error_page 404 /404.html;
|
||||
location = /404.html {
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
proxy_read_timeout 60;
|
||||
proxy_connect_timeout 60;
|
||||
proxy_redirect off;
|
||||
|
||||
# Allow the use of websockets
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
|
||||
location /api {
|
||||
proxy_pass http://127.0.0.1:8001;
|
||||
proxy_read_timeout 60;
|
||||
proxy_connect_timeout 60;
|
||||
proxy_redirect off;
|
||||
|
||||
# Allow the use of websockets
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
proxy_read_timeout 60;
|
||||
proxy_connect_timeout 60;
|
||||
proxy_redirect off;
|
||||
|
||||
# Allow the use of websockets
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user