I've always used Apache but I really want to use nginx for my next project (it's a Node/express app). How should I start? It'll be running on my Ubuntu VPS. Any tips, suggestions, common pitfalls?
For sure, the configuration file format is different, but it's not terribly complicated.
I use this code to open a unix socket in production at tmp/socket : https://gist.github.com/lgbr/5453355
And use a configuration like this for nginx (replace /etc/nginx/sites-available/default with this): https://gist.github.com/lgbr/5453375
sudo apt-get install nginx
$BROWSER http://wiki.nginx.org/Configuration
$EDITOR /etc/nginx/nginx.conf
man nginx
man upstart
sudo start nginx
$BROWSER http://localhost:$PORT/If you want the newest version, nginx has their own deb repository[1]. It seems to get security updates faster, too.
[1] http://wiki.nginx.org/Install#Official_Debian.2FUbuntu_packa...
EDIT: Not the PPA because it's "maintained by volunteers and is not distributed by nginx.org." Their repository:
deb http://nginx.org/packages/ubuntu/ yourOScodename nginx