Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. server {
  2. listen *:443 ssl http2;
  3. server_name forums.newdarkrp.fr;
  4. root /home/www/newdarkrp.fr/subdomains/forums;
  5. index index.php;
  6. #fastcgi_index index.php;
  7.  
  8. include /etc/nginx/includes/ssl/newdarkrp.fr.conf;
  9. include /etc/nginx/includes/ssl_cloudflare.conf;
  10. include /etc/nginx/conf.d/header.conf;
  11. include /etc/nginx/includes/hhvm.conf;
  12. include /etc/nginx/includes/error.conf;
  13. include /etc/nginx/bots.d/blockbots.conf;
  14. include fastcgi_params;
  15.  
  16. location / { try_files $uri $uri/ /index.php?$query_string; }
  17. location /api { try_files $uri $uri/ /api.php?$query_string; }
  18. location /admin { try_files $uri $uri/ /admin.php?$query_string; }
  19.  
  20. location ~* ^/(composer\.(json|lock)|config\.php|flarum|storage|vendor) {
  21. deny all;
  22. return 404;
  23. }
  24.  
  25. location ~* \.php$ {
  26. fastcgi_split_path_info ^(.+.php)(/.+)$;
  27. fastcgi_pass unix:/var/run/php5-fpm.sock;
  28. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  29. fastcgi_param HTTP_PROXY ""; # Fix for https://httpoxy.org/ vulnerability
  30. fastcgi_index index.php;
  31. }
  32.  
  33. location ~* \.html$ {
  34. expires -1;
  35. }
  36.  
  37. location ~* \.(css|js|gif|jpe?g|png)$ {
  38. expires 1M;
  39. add_header Pragma public;
  40. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  41. }
  42.  
  43. gzip on;
  44. gzip_http_version 1.1;
  45. gzip_vary on;
  46. gzip_comp_level 6;
  47. gzip_proxied any;
  48. gzip_types application/atom+xml
  49. application/javascript
  50. application/json
  51. application/vnd.ms-fontobject
  52. application/x-font-ttf
  53. application/x-web-app-manifest+json
  54. application/xhtml+xml
  55. application/xml
  56. font/opentype
  57. image/svg+xml
  58. image/x-icon
  59. text/css
  60. #text/html -- text/html is gzipped by default by nginx
  61. text/plain
  62. text/xml;
  63. gzip_buffers 16 8k;
  64. gzip_disable "MSIE [1-6]\.(?!.*SV1)";
  65.  
  66. error_log /root/error.log;
  67. access_log off;
  68. }