linux + nginx web server to do static

How to configure a static file server nginx

server {

    listen 999;

    server_name test;

    location / {

        root / temp /; # specify the directory where the file

        Order # key to open the directory; autoindex on

    }


If you do reverse proxy only need to add location in

    proxy_pass http://www.renren.com;


Also note that linux port 111 is reserved in the system, if the listener with ngnix 111 port, it is not in force.

Guess you like

Origin blog.51cto.com/1101837/2453440