Running wordpress on a nginx web server

Nginx is much faster and more resourceful when it comes to handling HTTP requests than Apache, which is why I chose to use it for my website. For people new to it, installing wordpress while using custom permalinks might seem tricky, but it’s actually really easy. Here’s what have have inside the server block for this blog:

location /blog/ {
	index index.php;
	try_files $uri $uri/ /blog/index.php;
}

This tells nginx that the blog is running in the /blog directory and that it should pass requests to index.php whenever a path requested doesn’t exist.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>