Nginx Wordpress configuration
Quite simple really:
server {
listen 80;
server_name domainname.com;
root /srv/http/domainname.com/;
access_log /var/log/nginx/domainname.com_access.log;
error_log /var/log/nginx/domainname.com_error.log;
location / {
index index.php;
# wordpress permalinks (clean urls)
try_files $uri $uri/ /index.php;
}
location ~ .*\.php$ {
include fastcgi_params;
include fastcgi_params.php;
fastcgi_pass_header Set-Cookie;
}
open_file_cache max=1000 inactive=20s;
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
location ~ /\.ht {
deny all;
}
}
fastcgi_params.php contains my php specific fastcgi configurations, mostly
fastcgi_split_path_info stuff.
With this configuration, Wordpress
siterurl should be set to
http://domainname.com/
--
AvishaiIshShalom - 26 Nov 2010