Attachment looks sort of sketch- benefit of anyone not willing to download:
server {
listen *:80 default;
server_name _;
access_log /home/blogs/logs/nginx/access.log;
error_log /home/blogs/logs/nginx/error.log debug;
location / {
deny all;
}
}
server {
listen *:80;
server_name site.com *.site.com the.site.com;
root /home/blogs/wordpress/;
index index.html index.php index.htm;
access_log /home/blogs/logs/nginx/site/access.log;
error_log /home/blogs/logs/nginx/site/error.log debug;
proxy_redirect off;
set $myuri $request_uri;
rewrite ^/wp-admin\/a$ /wp-admin/index.php;
if (!-e $request_filename) {
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) $1 last;
rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 last;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/blogs/wordpress$fastcgi_script_name;
include fastcgi_params;
}
# Try MemCached First
location / {
set $memcached_key "$uri?$args";
memcached_pass 127.0.0.1:11211;
error_page 404 405 502 504 = @fallback;
}
location @fallback {
try_files $uri $uri/ /index.php?$args;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
}
server {
listen *:80 default;
server_name _;
access_log /home/blogs/logs/nginx/access.log;
error_log /home/blogs/logs/nginx/error.log debug;
location / {
deny all;
}
}
server {
listen *:80;
server_name site.com *.site.com the.site.com;
root /home/blogs/wordpress/;
index index.html index.php index.htm;
access_log /home/blogs/logs/nginx/site/access.log;
error_log /home/blogs/logs/nginx/site/error.log debug;
proxy_redirect off;
set $myuri $request_uri;
rewrite ^/wp-admin\/a$ /wp-admin/index.php;
if (!-e $request_filename) {
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) $1 last;
rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 last;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/blogs/wordpress$fastcgi_script_name;
include fastcgi_params;
}
# Try MemCached First
location / {
set $memcached_key "$uri?$args";
memcached_pass 127.0.0.1:11211;
error_page 404 405 502 504 = @fallback;
}
location @fallback {
try_files $uri $uri/ /index.php?$args;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
}