Nginx in Ubuntu 13.04 Quick Start Guide

1. Install Nginx:

sudo apt-get install nginx

2. Where are the files?

dpkg -L nginx-full

dpkg -L nginx-common

dpkg -L nginx

3. Starting and stopping:

cd /etc/init.d

sudo ./nginx start

sudo ./nginx stop

4. Go on a test drive. Start the server, then,

curl http://localhost

Default document root is /usr/share/nginx/html. Change index.html there and make sure changes are picked up by the server.

View the access log file: /var/log/nginx/access.log.

4. Edit basic settings like document root

vi /etc/nginx/sites-enabled/default

5. Edit advanced settings like worker process, log file location:

vi /etc/nginx/nginx.conf

Note: total number of HTTP requests served = worker_processes X worker_connections.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s