Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #AUTOMATICALLY GENERATED - DO NO EDIT!
- server {
- listen *:80;
- server_name mailingboss.com;
- access_log /var/log/nginx/mailingbosscom.access.log;
- error_log /var/log/nginx/mailingbosscom.error.log;
- root /srv/mailingboss;
- index index.html index.htm index.php;
- # This order might seem weird - this is attempted to match last if rules below fail.
- location / {
- try_files $uri $uri/ /index.php?$args;
- }
- # Add trailing slash to */wp-admin requests.
- rewrite /wp-admin$ $scheme://$host$uri/ permanent;
- # Directives to send expires headers and turn off 404 error logging.
- 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)$ {
- access_log off; log_not_found off; expires max;
- }
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
- # Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
- location ~ /\. {
- deny all;
- }
- # Deny access to any files with a .php extension in the uploads directory
- # Works in sub-directory installs and also in multisite network
- # Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
- location ~* /(?:uploads|files)/.*\.php$ {
- deny all;
- }
- location ~ [^/]\.php(/|$) {
- # Zero-day exploit defense.
- # http://forum.nginx.org/read.php?2,88845,page=3
- # Won't work properly (404 error) if the file is not stored on this server, which is entirely possible with php-fpm/php-fcgi.
- # 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.
- try_files $uri =404;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_index index.php;
- include fcgi.conf;
- fastcgi_pass unix:/var/run/php-fcgi-mailingbosscom-php-fcgi-0.sock;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement