Posts under ‘nginx’

WordPress permalinks in nginx

WordPress generally works out-of-the box on nginx. The posts load fine, the functions in the dashboard work pretty well, until you come to the permalinks. If you are on Apache, with mod_rewrite, WordPress will automatically add the required rewrite rules to your .htaccess file for permalinks to work. But for nginx, you have to add […]

IPv6 support in nginx

To enable IPv6 support in nginx, we need to check whether it has been compiled with –with-ipv6 flag. To check, fire up the terminal and type in this command : The results should be something like this : Pre-compiled Debian/Ubuntu packages already has IPv6 support built-in. Now we need to edit the configuration file to […]

Nginx reduces page load time, increases Googlebot activity

After a small incident with a shared host, I moved my phpBB forum and a few other static sites to a VPS running on nginx. Nginx is a small, lightweight but very efficient web server created by Igor Sysoev, originally developed for www.rambler.ru, Russia’s second-largest web site. Due to it’s light-weightedness and efficiency, it is […]

Enable directory listing in nginx

Enabling directory listing in a folder in nginx seems simple enough with just an autoindex on; directive inside the location directive. However, for some reason, it didn’t work for me. I finally got it to work by moving the root directive out of location. So, if you have something like this : Change it to […]

Www/no-www rewrite rules for nginx

There are many ways to rewrite www urls to their non-www versions in nginx. Here one that’s Igor-approved and works well on my setup : WWW to Non-WWW: Non-WWW to WWW: