Advertisement
drpanwe

Untitled

Jan 4th, 2021
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.61 KB | None | 0 0
  1. server {
  2. listen 443 ssl http2;
  3. listen [::]:443 ssl http2;
  4. server_name matrix.harpocrates.club;
  5.  
  6. access_log /var/log/nginx/nginx.matrix.harpocrates.club.access.log;
  7. error_log /var/log/nginx/nginx.matrix.harpocrates.club.error.log;
  8.  
  9. location / {
  10. root /var/www/matrix.harpocrates.club/html;
  11. index index.html;
  12. }
  13.  
  14. ssl_certificate /etc/letsencrypt/live/harpocrates.club/fullchain.pem;
  15. ssl_certificate_key /etc/letsencrypt/live/harpocrates.club/privkey.pem;
  16. ssl_session_timeout 1d;
  17. ssl_session_tickets off;
  18.  
  19. # Diffie-Hellman parameter for DHE ciphersuites
  20. ssl_dhparam /etc/ssl/certs/dhparams.pem;
  21.  
  22. # Enable server-side protection against BEAST attacks
  23. ssl_prefer_server_ciphers on;
  24. ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DH+3DES:!ADH:!AECDH:!MD5;
  25.  
  26. # Enable OCSP stapling (http://blog.mozilla.org/security/2013/07/29/ocsp-stapling-in-firefox)
  27. ssl_stapling on;
  28. ssl_stapling_verify on;
  29. resolver 8.8.8.8 8.8.4.4 valid=300s;
  30. resolver_timeout 5s;
  31.  
  32. # verify chain of trust of OCSP response using Root CA and Intermediate certs
  33. ssl_trusted_certificate /etc/letsencrypt/live/harpocrates.club/fullchain.pem;
  34.  
  35. # Required for LE certificate enrollment using certbot
  36. location ^~ /.well-known/acme-challenge/ {
  37. default_type "text/plain";
  38. root /var/www/html;
  39. }
  40.  
  41. # Dendrite
  42. proxy_set_header Host $host;
  43. proxy_set_header X-Real-IP $remote_addr;
  44. proxy_read_timeout 600;
  45.  
  46. location /.well-known/matrix/server {
  47. return 200 '{ "m.server": "matrix.harpocrates.club:443" }';
  48. }
  49.  
  50. location /.well-known/matrix/client {
  51. return 200 '{ "m.homeserver": { "base_url": "https://matrix.harpocrates.club" } }';
  52. }
  53.  
  54. location /_matrix {
  55. proxy_pass https://localhost:8448;
  56. #proxy_set_header X-Forwarded-For $remote_addr;
  57. }
  58. }
  59.  
  60.  
  61.  
  62.  
  63.  
  64. Ports locally:
  65. drpaneas@debian-s-1vcpu-1gb-fra1-01:/etc/nginx/sites-available$ sudo lsof -i:8008
  66. COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
  67. dendrite- 21301 root 17u IPv6 222175 0t0 TCP *:8008 (LISTEN)
  68. drpaneas@debian-s-1vcpu-1gb-fra1-01:/etc/nginx/sites-available$ sudo lsof -i:8448
  69. COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
  70. dendrite- 21301 root 16u IPv6 222173 0t0 TCP *:8448 (LISTEN)
  71.  
  72.  
  73.  
  74. Firewall:
  75. $ sudo ufw status verbose
  76. Status: active
  77. Logging: on (low)
  78. Default: deny (incoming), allow (outgoing), disabled (routed)
  79. New profiles: skip
  80.  
  81. To Action From
  82. -- ------ ----
  83. 4444/tcp LIMIT IN Anywhere
  84. 80,443/tcp (Nginx Full) ALLOW IN Anywhere
  85. 8448/tcp ALLOW IN Anywhere # Dendrite with SSL
  86. 8008/tcp ALLOW IN Anywhere # Dendrite without SSL
  87. 4444/tcp (v6) LIMIT IN Anywhere (v6)
  88. 80,443/tcp (Nginx Full (v6)) ALLOW IN Anywhere (v6)
  89. 8448/tcp (v6) ALLOW IN Anywhere (v6) # Dendrite with SSL
  90. 8008/tcp (v6) ALLOW IN Anywhere (v6) # Dendrite without SSL
  91.  
  92.  
  93. Monolith.logs:
  94. $ sudo tail -f /var/log/dendrite/Monolith.log
  95. time="2021-01-04T16:53:42.007654330Z" level=info msg="Enabled perspective key fetcher" func=github.com/matrix-org/dendrite/signingkeyserver.NewInternalAPI file="github.com/matrix-org/dendrite/signingkeyserver/signingkeyserver.go:103" num_public_keys=2 server_name=matrix.org
  96. time="2021-01-04T16:53:42.409032016Z" level=info msg="Starting external Monolith listener on :8008" func="github.com/matrix-org/dendrite/setup.(*BaseDendrite).SetupAndServeHTTP.func2" file="github.com/matrix-org/dendrite/setup/base.go:344"
  97. time="2021-01-04T17:17:38.724164175Z" level=info msg="Dendrite version 0.3.4+05324b68" func=github.com/matrix-org/dendrite/setup.NewBaseDendrite file="github.com/matrix-org/dendrite/setup/base.go:102"
  98. time="2021-01-04T17:17:38.769834726Z" level=info msg="Enabled perspective key fetcher" func=github.com/matrix-org/dendrite/signingkeyserver.NewInternalAPI file="github.com/matrix-org/dendrite/signingkeyserver/signingkeyserver.go:103" num_public_keys=2 server_name=matrix.org
  99. time="2021-01-04T17:17:38.926458692Z" level=info msg="Starting external Monolith listener on :8448" func="github.com/matrix-org/dendrite/setup.(*BaseDendrite).SetupAndServeHTTP.func2" file="github.com/matrix-org/dendrite/setup/base.go:344"
  100. time="2021-01-04T17:17:38.927320682Z" level=info msg="Starting external Monolith listener on :8008" func="github.com/matrix-org/dendrite/setup.(*BaseDendrite).SetupAndServeHTTP.func2" file="github.com/matrix-org/dendrite/setup/base.go:344"
  101. time="2021-01-04T18:27:13.301542019Z" level=info msg="Dendrite version 0.3.4+05324b68" func=github.com/matrix-org/dendrite/setup.NewBaseDendrite file="github.com/matrix-org/dendrite/setup/base.go:102"
  102. time="2021-01-04T18:27:13.344276591Z" level=info msg="Enabled perspective key fetcher" func=github.com/matrix-org/dendrite/signingkeyserver.NewInternalAPI file="github.com/matrix-org/dendrite/signingkeyserver/signingkeyserver.go:103" num_public_keys=2 server_name=matrix.org
  103. time="2021-01-04T18:27:13.524455173Z" level=info msg="Starting external Monolith listener on :8448" func="github.com/matrix-org/dendrite/setup.(*BaseDendrite).SetupAndServeHTTP.func2" file="github.com/matrix-org/dendrite/setup/base.go:344"
  104. time="2021-01-04T18:27:13.525375566Z" level=info msg="Starting external Monolith listener on :8008" func="github.com/matrix-org/dendrite/setup.(*BaseDendrite).SetupAndServeHTTP.func2" file="github.com/matrix-org/dendrite/setup/base.go:344"
  105.  
  106.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement