It seems the mainline version is stable enough to be used in production so going with it (rather than the ubuntu package)
Pre-reqs
sudo apt-get install zlib1g zlib1g-dev
sudo apt-get install openssl libssl-dev
sudo apt-get install libpcre3 libpcre3-dev
sudo apt-get install libgd3 libgd-dev
sudo apt-get install libgeoip-dev
Download latest mainline version from http://nginx.org/en/download.html
./configure --with-http_ssl_module --with-http_realip_module --with-http_image_filter_module --with-http_geoip_module --with-http_stub_status_module
make
sudo make install
Configuration
sudo useradd -G www www
sudo cp /usr/local/nginx/conf/nginx.conf /usr/local/nginx/conf/nginx.conf.bak
edit /usr/local/nginx/conf/nginx.conf
user www www;
worker_processes auto;
Some commands
check version: /usr/local/nginx/sbin/nginx -V
Test conf: sudo /usr/local/nginx/sbin/nginx -t
Start server: sudo /usr/local/nginx/sbin/nginx
client_max_body_size: max size of a client request body.. important if user uploading files default it 1m
client_header_buffer_size: size of request header, default is 1k
internal: makes the location block internal
variables
$arg_XXX : GET parameters
$args: query string
Pre-reqs
sudo apt-get install zlib1g zlib1g-dev
sudo apt-get install openssl libssl-dev
sudo apt-get install libpcre3 libpcre3-dev
sudo apt-get install libgd3 libgd-dev
sudo apt-get install libgeoip-dev
Download latest mainline version from http://nginx.org/en/download.html
./configure --with-http_ssl_module --with-http_realip_module --with-http_image_filter_module --with-http_geoip_module --with-http_stub_status_module
make
sudo make install
Configuration
sudo useradd -G www www
sudo cp /usr/local/nginx/conf/nginx.conf /usr/local/nginx/conf/nginx.conf.bak
edit /usr/local/nginx/conf/nginx.conf
user www www;
worker_processes auto;
Some commands
check version: /usr/local/nginx/sbin/nginx -V
Test conf: sudo /usr/local/nginx/sbin/nginx -t
Start server: sudo /usr/local/nginx/sbin/nginx
client_max_body_size: max size of a client request body.. important if user uploading files default it 1m
client_header_buffer_size: size of request header, default is 1k
internal: makes the location block internal
variables
$arg_XXX : GET parameters
$args: query string