diff --git a/devops/nginx/nginx.conf b/devops/nginx/nginx.conf index 597e147..c548171 100644 --- a/devops/nginx/nginx.conf +++ b/devops/nginx/nginx.conf @@ -34,6 +34,44 @@ http { # for more information. include /etc/nginx/conf.d/*.conf; + server { + if ($host = oktopus.app.br) { + return 301 https://$host$request_uri; + } + listen 80; + listen [::]:80; + server_name oktopus.app.br; + return 404; + } + + server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name oktopus.app.br; + root /usr/share/nginx/html; + + # Load configuration files for the default server block. + include /etc/nginx/default.d/*.conf; + + ssl_certificate "/etc/letsencrypt/live/oktopus.app.br/fullchain.pem"; + ssl_certificate_key "/etc/letsencrypt/live/oktopus.app.br/privkey.pem"; + ssl_session_cache shared:SSL:1m; + ssl_session_timeout 10m; + ssl_ciphers HIGH:!aNULL:!MD5; + ssl_prefer_server_ciphers on; + + error_page 404 /404.html; + location = /404.html { + } + + location / { + proxy_pass http://127.0.0.1:3001; + proxy_read_timeout 60; + proxy_connect_timeout 60; + proxy_redirect off; + } + } + server { if ($host = oktopustr369.com) { return 301 https://$host$request_uri;