diff --git a/devops/nginx.conf b/devops/nginx.conf index aa8dc9e..301aa4a 100644 --- a/devops/nginx.conf +++ b/devops/nginx.conf @@ -45,49 +45,54 @@ http { } server { - listen 443 http2; - listen [::]:443 ssl http2; - server_name oktopustr369.com; - root /usr/share/nginx/html; + listen 443 ssl 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/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; + 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; - 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; - } + 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; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + } + } +} \ No newline at end of file