Nginx(6)

server {
        listen  80;
        server_name  www.a.com;
        #ssl on;
        #ssl_session_timeout 5m;
        #keepalive_timeout 70;
        #ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        #ssl_ciphers HIGH:!aNULL:!MD5;
        #ssl_prefer_server_ciphers on;
        #ssl_certificate /etc/nginx/ssl/server.crt;
        #ssl_certificate_key /etc/nginx/ssl/server.key;

        location / {

             #反向代理的地址
             #proxy_pass https://backend;  
                root /var/www/a;
           
        }

        location /bimg/
        {
           root /var/www/b;
        }

        location /cimg/
        {
                root /var/www/c;
        }

}

root@ubuntu:/var/www# ll
total 20
drwxr-xr-x  5 www-data www-data 4096 Dec  2 19:12 ./
drwxr-xr-x 14 root     root     4096 Dec  2 18:52 ../
drwxr-xr-x  2 www-data www-data 4096 Dec  2 18:53 a/
drwxr-xr-x  3 www-data www-data 4096 Dec  2 19:10 b/
drwxr-xr-x  3 www-data www-data 4096 Dec  2 19:12 c/
root@ubuntu:/var/www# ll b
total 12
drwxr-xr-x 3 www-data www-data 4096 Dec  2 19:10 ./
drwxr-xr-x 5 www-data www-data 4096 Dec  2 19:12 ../
drwxr-xr-x 2 www-data www-data 4096 Dec  2 19:11 bimg/
root@ubuntu:/var/www# ll c
total 12
drwxr-xr-x 3 www-data www-data 4096 Dec  2 19:12 ./
drwxr-xr-x 5 www-data www-data 4096 Dec  2 19:12 ../
drwxr-xr-x 2 www-data www-data 4096 Dec  2 19:24 cimg/

root@ubuntu:/var/www# ll b/bimg/
total 40
drwxr-xr-x 2 www-data www-data  4096 Dec  2 19:11 ./
drwxr-xr-x 3 www-data www-data  4096 Dec  2 19:10 ../
-rw-r--r-- 1 www-data www-data 28745 Jul  8  2013 1.jpg
root@ubuntu:/var/www# ll c/cimg/
total 140
drwxr-xr-x 2 www-data www-data   4096 Dec  2 19:24 ./
drwxr-xr-x 3 www-data www-data   4096 Dec  2 19:12 ../
-rw-r--r-- 1 www-data www-data 128934 Jul  8  2013 1.jpg
-rw-r--r-- 1 root     root         30 Dec  2 19:24 index.html

你可能感兴趣的:(Nginx(6))