Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. server {
  2. server_name seekadventure.net;
  3. return 301 http://www.seekadventure.net$request_uri;
  4.  
  5. listen 443 ssl; # managed by Certbot
  6. ssl_certificate /etc/letsencrypt/live/seekadventure.net/fullchain.pem; # manag$
  7. ssl_certificate_key /etc/letsencrypt/live/seekadventure.net/privkey.pem; # man$
  8. include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  9. ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  10.  
  11. # Security headers
  12. add_header Strict-Transport-Security "max-age=2592000; includeSubDomains; preloa$
  13.  
  14. location ~* ^/(composer\.(json|lock)|config\.php|flarum|storage|vendor) {
  15. deny all;
  16. return 404;
  17. }
  18.  
  19.  
  20. }
  21.  
  22.  
  23. server {
  24. # Security headers
  25. add_header Strict-Transport-Security "max-age=2592000; includeSubDomains; preloa$
  26.  
  27.  
  28. root /var/www/seekadventure.net;
  29. index index.php index.html index.htm;
  30. error_log /var/log/nginx/error.log error;
  31.  
  32. server_name www.seekadventure.net;
  33.  
  34.  
  35. location / { try_files $uri $uri/ /index.php?$query_string; }
  36. location /api { try_files $uri $uri/ /api.php?$query_string; }
  37. location /admin { try_files $uri $uri/ /admin.php?$query_string; }
  38.  
  39. location /flarum {
  40. deny all;
  41. return 404;
  42. }
  43.  
  44. location ~ .php$ {
  45. fastcgi_split_path_info ^(.+.php)(/.+)$;
  46. fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
  47. fastcgi_index index.php;
  48. include fastcgi_params;
  49.  
  50.  
  51.  
  52. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  53. }
  54.  
  55. location ~* \.html$ {
  56. expires -1;
  57. }
  58.  
  59. location ~* \.(css|js|gif|jpe?g|png)$ {
  60. expires 1M;
  61. add_header Pragma public;
  62. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  63. }
  64.  
  65.  
  66. location ~* ^/(composer\.(json|lock)|config\.php|flarum|storage|vendor) {
  67. deny all;
  68. return 404;
  69. }
  70.  
  71. gzip on;
  72. gzip_http_version 1.1;
  73. gzip_vary on;
  74. gzip_comp_level 6;
  75. gzip_proxied any;
  76. gzip_types application/atom+xml
  77. application/javascript
  78. application/json
  79. application/vnd.ms-fontobject
  80. application/x-font-ttf
  81. application/x-web-app-manifest+json
  82. application/xhtml+xml
  83. application/xml
  84. font/opentype
  85. image/svg+xml
  86. image/x-icon
  87. text/css
  88. text/plain
  89. text/xml;
  90. gzip_buffers 16 8k;
  91. gzip_disable "MSIE [1-6]\.(?!.*SV1)";
  92.  
  93.  
  94.  
  95. listen 443 ssl; # managed by Certbot
  96. ssl_certificate /etc/letsencrypt/live/seekadventure.net/fullchain.pem; # manag$
  97. ssl_certificate_key /etc/letsencrypt/live/seekadventure.net/privkey.pem; # man$
  98. include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  99. ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  100.  
  101. }
  102.  
  103.  
  104. server {
  105. if ($host = seekadventure.net) {
  106. return 301 https://$host$request_uri;
  107. } # managed by Certbot
  108.  
  109.  
  110. listen 80;
  111. server_name seekadventure.net;
  112. return 404; # managed by Certbot
  113.  
  114.  
  115. }
  116.  
  117. server {
  118. if ($host = www.seekadventure.net) {
  119. return 301 https://$host$request_uri;
  120. } # managed by Certbot
  121.  
  122.  
  123. listen 80;
  124.  
  125. server_name www.seekadventure.net;
  126. return 404; # managed by Certbot
  127.  
  128.  
  129. }