Nginx is becoming very popular to host the websites. WordPress is best and popular CMS in the world now. Nginx gives really great performance with wordpress sites. Earlier I given the Nginx configuration with this code. I given code for wordpress and Nginx configuration. For hosting your wordpress website on Nginx server is the best option.
nginx wordpress plugins nginx setup for wordpress
If you have dedicated server then go with nginx server.
wordpress + Nginx + permalink
I found two plugins which are supported to Nginx installtion. But both plugins are not give you nginx rule for setup nginx rule.
http://wordpress.org/extend/plugins/nginx-compatibility/
http://wordpress.org/extend/plugins/nginx-proxy-cache-integrator/
Now I will show you how setup wordpress site on Nginx server.
Just put following code in your nginx.conf file. This code will fix the wordpress permalink issue also.
server {
listen 80;
server_name localhost.localdomain;
# access_log logs/site.access.log;
location / {
root /usr/share/nginx/html;
index index.php;
if (!-e $request_filename) {
rewrite ^.+?(/wp-.*) /$1 last;
rewrite ^.+?(/.*\.php)$ /$1 last;
rewrite ^(.+)$ /index.php?q=$1 last;
break;
}
location = /50x.html {
fastcgi_pass localhost:9999;
fastcgi_index index.php;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param SCRIPT_FILENAME /var/www/example.com$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
root /var/www/nginx-default;
}
}
Note: Dont forgot to install fastcgi on your server. Start the fastcgi server on port no 9000(which is default port)
For wordpressMu use following URL
https://purabtech.in/nginx-rule-for-wordpressmu-with-pretty-url/