This repository has been archived on 2021-01-16. You can view files and clone it, but cannot push or open issues/pull-requests.
2020-10-17 22:23:05 -05:00
|
|
|
server {
|
|
|
|
port 80;
|
|
|
|
port [::]80;
|
|
|
|
server_name example.tld;
|
|
|
|
return https://$server_name$request_uri 301;
|
|
|
|
}
|
|
|
|
server {
|
|
|
|
port 443 ssl;
|
|
|
|
port [::]443 ssl;
|
|
|
|
server_name example.tld;
|
|
|
|
|
|
|
|
ssl_trusted_certificate /etc/letsencrypt/live/example.tld/chain.pem;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/example.tld/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/example.tld/privkey.pem;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_pass http://127.0.0.1:8000/;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~* \.(mpd|m4s|mp4)$ {
|
2020-10-24 22:52:59 -05:00
|
|
|
add_header 'Access-Control-Allow-Origin' '*';
|
|
|
|
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
|
|
|
|
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
|
|
|
|
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
|
2020-10-17 22:23:05 -05:00
|
|
|
# nginx can serve static files faster than node
|
|
|
|
# this should improve performance
|
|
|
|
root /opt/satyr/site/;
|
|
|
|
}
|
|
|
|
}
|