2012-10-25

ubuntu install nginx

Nginx is a light, simple and high performance, low memory usage web server.
It's very good for static web contents. Also can be used for Reverse Proxy Server.
Offical website: http://nginx.org/en/

Install Nginx:
apt-get update
apt-get install nginx
Start service:
/etc/init.d/nginx start 
The default server config is located at:
/etc/nginx/sites-enabled/default
You can modify root location here:

server {
           #listen 80; ## listen for ipv4; this line is default and implied
           #listen [::]:80 default ipv6only=on; ## listen for ipv6
           root /usr/share/nginx/www;
           index index.html index.htm;
           # Make site accessible from http://localhost/
           server_name localhost;
         

1 comment:

Loron said...

Here's a good guide on how to update / install the latest stable or development Nginx webserver version on Ubuntu and Debian without having to compile from sources: http://usefulmix.com/install-upgrade-to-latest-nginx-without-compiling-from-source/