Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- # Replace this port with the right one for your requirements
- listen 80;
- # Multiple hostnames separated by spaces. Replace these as well.
- server_name nope nope;
- root /home/web/nope;
- access_log /home/web/logs/nope;
- # We'll enable errorlog for a bit, to see if anything breaks
- error_log /home/web/logs/nope;
- index index.php index.html index.htm;
- # static file 404's aren't logged and expires header is set to maximum age
- location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
- access_log off;
- expires max;
- }
- # Need the $uri and $args for donating to work.
- location / {
- try_files $uri $uri/ /index.php?q=$uri&$args;
- }
- location /~ { return 404; }
- location ~* wp-config.php { deny all; }
- location ~* wp-admin/includes { deny all; }
- location ~* wp-includes/theme-compat/ { deny all; }
- location ~* wp-includes/js/tinymce/langs/.*\.php { deny all; }
- location /wp-content/ { internal; }
- location /wp-includes/ { internal; }
- location ~* ^/wp-content/uploads/.*.(html|htm|shtml|php)$ {
- types { }
- default_type text/plain;
- }
- location ~ \.php$ {
- set $memcached_key "wordpress:$request_uri";
- memcached_pass 127.0.0.1:11211;
- default_type text/html;
- error_page 404 405 502 = @cache_miss;
- }
- location @cache_miss {
- include fastcgi_params;
- try_files $uri =404;
- fastcgi_intercept_errors on;
- # By all means use a different server for the fcgi processes if you need to
- fastcgi_pass unix:/tmp/php-fpm.sock;
- }
- location ~ /\. {
- deny all;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement