Posts from ‘July, 2010’

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:

Unexpected email and Alexa bot

I got a surprise today when I found that I have an email in my inbox from The email had subject “Subject” and has content “Content”. My first instinct was that someone has hacked into my VPS. After a few minutes of mind-racking, I remembered that I had created a PHP file on the […]

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