Guest User

Untitled

a guest
Jun 15th, 2025
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. # HTTP redirect to HTTPS
  2. server {
  3. listen 80;
  4. server_name nthpyro.dev www.nthpyro.dev;
  5. return 301 https://$host$request_uri;
  6. }
  7.  
  8.  
  9. server {
  10. listen 443 ssl;
  11. server_name nthpyro.dev www.nthpyro.dev;
  12.  
  13. # SSL Certificates
  14. ssl_certificate /etc/letsencrypt/live/nthpyro.dev/fullchain.pem;
  15. ssl_certificate_key /etc/letsencrypt/live/nthpyro.dev/privkey.pem;
  16. include /etc/letsencrypt/options-ssl-nginx.conf;
  17. ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
  18.  
  19. root /var/www/nthpyro.dev/html;
  20. index index.html;
  21.  
  22. location = /.well-known/matrix/server {
  23. default_type application/json;
  24. add_header Access-Control-Allow-Origin *;
  25. return 200 '{"m.server": "nthpyro.dev:8448"}';
  26. }
  27.  
  28. location = /.well-known/matrix/client {
  29. default_type application/json;
  30. add_header Access-Control-Allow-Origin *;
  31. return 200 '{"m.homeserver": {"base_url": "https://nthpyro.dev"}}';
  32. }
  33.  
  34. location /_matrix {
  35. proxy_pass http://127.0.0.1:8008;
  36. proxy_set_header X-Forwarded-For $remote_addr;
  37. client_max_body_size 30M;
  38. }
  39.  
  40. }
  41.  
  42.  
  43. server {
  44. listen 8448 ssl;
  45. server_name nthpyro.dev;
  46.  
  47.  
  48. ssl_certificate /etc/letsencrypt/live/nthpyro.dev/fullchain.pem;
  49. ssl_certificate_key /etc/letsencrypt/live/nthpyro.dev/privkey.pem;
  50.  
  51. location / {
  52. proxy_pass http://127.0.0.1:8008;
  53. proxy_set_header X-Forwarded-For $remote_addr;
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment