Depending on your configuration, this file might be located somewhere else. (Check /usr/local/nginx/conf/nginx.conf if you compiled nginx manually)
Search for listen directives and change them as follows:
This will make nginx bind to both IPv6 and IPv4 addresses.
In order to bind to IPv6 addresses only (no IPv4), use the following:
[code]listen [::]:80 default ipv6only=on;[/code]
In order to bind to a specific IPv6 address:
When you are done, reload the nginx configuration file by typing in :
[code language=”bash”]nginx -s reload[/code]
Now we have to check whether nginx is listening to both IPv6 and IPv4 requests:
[code language=”bash”]netstat -tulpna | grep nginx[/code]
You’ll get something like this :
[code]tcp6 0 0 :::80 :::* LISTEN 1891/nginx[/code]
You have successfully configured nginx to respond to IPv6 requests.
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 used by a lot of high traffic sites like WordPress, Hulu, Github, Ohloh, SourceForge, TorrentReactor, etc. After moving to Nginx, I noticed a significant improvement in page load times. The pages on the site load in around 0.0X seconds now, as reported by the phpBB’s measurement system. The pages also seem to be snappier as compared to the time when I was on Litespeed.
I recently noticed that apart for the decrease in page loading time, the activity of Googlebot has increased manyfold. Here’s a screen-shot of the report from Google Webmaster Tools :
Not bad, eh?
More recently, I moved this blog to the VPS running on Nginx, and I have not been disappointed. This blog is running on WordPress 3.0.1, with no caching plugins. The posts seem to load faster than ever, as evident from this Google Webmaster Tools report :
I couldn’t be more happy.
PS: Of course, some of the speed improvement can be attributed to the fact that I moved from a shared server to a VPS, but that doesn’t undermine the awesomeness that is Nginx.
I got a surprise today when I found that I have an email in my inbox from firstname.lastname@example.org. 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 VPS named ‘mail.php’ to test whether emails were being sent. But, no one knew of it’s existence except me. Someone must’ve stumbled upon it my chance.
I logged into my VPS and checked the access logs.
[bash]cat animorphsfanforum.access.log | grep ‘mail.php'[/bash]
[code]184.108.40.206 – – [20/Jul/2010:05:32:40 +0000] "GET /mail.php HTTP/1.0" 200 0 "-" "ia_archiver (+http://www.alexa.com/site/help/webmasters; email@example.com)"[/code]
I have a Firefox plugin to check the Alexa rank, and the URL must’ve been sent to Alexa when I executed that script for the first time. The Alexa bot sent the email while crawling the URL.