Advertisement
Guest User

Untitled

a guest
Mar 18th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. server {
  2. listen 80 default_server;
  3. listen [::]:80 default_server;
  4.  
  5. # SSL configuration
  6. #
  7. # listen 443 ssl default_server;
  8. # listen [::]:443 ssl default_server;
  9. #
  10. # Self signed certs generated by the ssl-cert package
  11. # Don't use them in a production server!
  12. #
  13. # include snippets/snakeoil.conf;
  14.  
  15. root /var/www/html;
  16.  
  17. # Add index.php to the list if you are using PHP
  18. index index.php index.html;
  19.  
  20. server_name rpheaven.org www.rpheaven.org;
  21.  
  22.  
  23. location = /forum/conf_global.php
  24. {
  25. deny all;
  26. }
  27.  
  28. location ~ /forum/uploads/.*\.(php|pl|rb|sh)$ {
  29. deny all;
  30. }
  31.  
  32.  
  33. location ~ /configuration/.*\.(php)$ {
  34. deny all;
  35. }
  36. location ~ /cache/.*\.(php)$ {
  37. deny all;
  38. }
  39.  
  40.  
  41.  
  42. if ($http_user_agent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36"){
  43. return 403;}
  44.  
  45. deny 5.12.8.241;
  46. deny 188.25.38.137;
  47. deny 5.12.180.102;
  48. deny 62.210.83.88;
  49. deny 67.85.171.216;
  50. deny 67.85.171.216;
  51. deny 104.200.151.59;
  52. deny 104.200.151.79;
  53. deny 124.169.216.215;
  54. #deny 95.76.22.151;
  55. location ~ \.php$ {
  56. try_files $uri =404;
  57. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  58. # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  59.  
  60. # With php5-cgi alone:
  61. #fastcgi_pass 127.0.0.1:9000;
  62. # With php5-fpm:
  63. fastcgi_pass unix:/var/run/php/php5.6-fpm.sock;
  64. fastcgi_index index.php;
  65. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  66. include fastcgi_params;
  67. }
  68.  
  69. # deny access to .htaccess files, if Apache's document root
  70. # concurs with nginx's one
  71. #
  72. #location ~ /\.ht {
  73. # deny all;
  74. #}
  75.  
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement