diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..08bc650 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,34 @@ +# aethex.live nginx config - proxies to port 3010 +server { + listen 80; + server_name aethex.live www.aethex.live; + return 301 https://$host$request_uri; +} +server { + listen 443 ssl; + server_name aethex.live www.aethex.live; + ssl_certificate /etc/letsencrypt/live/aethex.live/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/aethex.live/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; + location / { + proxy_pass http://127.0.0.1:3010; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + proxy_read_timeout 86400; + } + location /socket.io/ { + proxy_pass http://127.0.0.1:3010; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + } + location /hls/ { + proxy_pass http://127.0.0.1:8000/; + add_header Cache-Control "no-cache"; + add_header Access-Control-Allow-Origin "*"; + } +}