Guest User

Untitled

a guest
Aug 7th, 2014
299
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #AUTOMATICALLY GENERATED - DO NO EDIT!
  2.  
  3.  
  4.  
  5. server {
  6. listen *:80;
  7.  
  8.  
  9. server_name mailingboss.com;
  10.  
  11. access_log /var/log/nginx/mailingbosscom.access.log;
  12. error_log /var/log/nginx/mailingbosscom.error.log;
  13.  
  14. root /srv/mailingboss;
  15. index index.html index.htm index.php;
  16.  
  17. # This order might seem weird - this is attempted to match last if rules below fail.
  18. location / {
  19. try_files $uri $uri/ /index.php?$args;
  20. }
  21.  
  22. # Add trailing slash to */wp-admin requests.
  23. rewrite /wp-admin$ $scheme://$host$uri/ permanent;
  24.  
  25. # Directives to send expires headers and turn off 404 error logging.
  26. location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
  27. access_log off; log_not_found off; expires max;
  28. }
  29.  
  30. location = /favicon.ico {
  31. log_not_found off;
  32. access_log off;
  33. }
  34. location = /robots.txt {
  35. allow all;
  36. log_not_found off;
  37. access_log off;
  38. }
  39. # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
  40. # Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
  41. location ~ /\. {
  42. deny all;
  43. }
  44. # Deny access to any files with a .php extension in the uploads directory
  45. # Works in sub-directory installs and also in multisite network
  46. # Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
  47. location ~* /(?:uploads|files)/.*\.php$ {
  48. deny all;
  49. }
  50.  
  51.  
  52.  
  53. location ~ [^/]\.php(/|$) {
  54.  
  55. # Zero-day exploit defense.
  56. # http://forum.nginx.org/read.php?2,88845,page=3
  57. # Won't work properly (404 error) if the file is not stored on this server, which is entirely possible with php-fpm/php-fcgi.
  58. # Comment the 'try_files' line out if you set up php-fpm/php-fcgi on another machine. And then cross your fingers that you won't get hacked.
  59. try_files $uri =404;
  60. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  61.  
  62. fastcgi_index index.php;
  63. include fcgi.conf;
  64. fastcgi_pass unix:/var/run/php-fcgi-mailingbosscom-php-fcgi-0.sock;
  65. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  66.  
  67. }
  68.  
  69. }
RAW Paste Data