The collection of configuration files which run ataber.pw. Published here because people asked for them.

123456789101112131415161718192021222324252627282930313233343536373839
  1. server {
  2. listen 80;
  3. listen [::]:80;
  4. server_name emby.ataber.pw;
  5. return 301 https://$host$request_uri;
  6. }
  7. server {
  8. listen 443 ssl http2;
  9. listen [::]:443 ssl http2;
  10. ssl_certificate /etc/letsencrypt/live/ataber.pw/fullchain.pem;
  11. ssl_certificate_key /etc/letsencrypt/live/ataber.pw/privkey.pem;
  12. ssl_trusted_certificate /etc/letsencrypt/live/ataber.pw/chain.pem;
  13. ssl_dhparam /etc/ssl/private/dhparam.pem;
  14. add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
  15. add_header X-Xss-Protection "1; mode=block" always;
  16. add_header X-Content-Type-Options "nosniff" always;
  17. add_header X-Frame-Options "SAMEORIGIN" always;
  18. proxy_hide_header X-Powered-By;
  19. add_header 'Referrer-Policy' 'no-referrer';
  20. add_header Content-Security-Policy "frame-ancestors ataber.pw emby.ataber.pw;";
  21. server_name emby.ataber.pw;
  22. location / {
  23. proxy_pass http://localhost:8096;
  24. proxy_http_version 1.1;
  25. proxy_set_header Upgrade $http_upgrade;
  26. proxy_set_header Connection 'upgrade';
  27. proxy_set_header Host $host;
  28. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  29. proxy_set_header X-Real-IP $remote_addr;
  30. proxy_set_header If-Range $http_if_range;
  31. proxy_set_header Range $http_range;
  32. }
  33. }