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 […]

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 […]

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: [code]#301 redirect www to non-www server { listen [::]:80; server_name www.domain.com; rewrite ^ http://domain.com$request_uri? permanent; } server { listen [::]:80; server_name domain.com; ………………………………….. ………………………………….. }[/code] Non-WWW to […]

Nginx: Resolving “No input file specified” error

If you are using nginx with php-cgi and have followed the standard procedure to set it up, you might often get the “No input file specified.” error. What happens here is that, when nginx receives the request to serve a non-existent php file, it passes the request to php-cgi. Php-cgi, while trying to processs the […]