nginx 프 록 시 네트워크 서버 폴 더

외부 네트워크 호스트 설정:
#user  nobody;
worker_processes  1;

events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;

    keepalive_timeout  100;

    server {
        listen 7070;
        server_name localhost;

        location ^~ /hyjgpt { 
        proxy_pass        http://192.168.13.106:7878/;     
    }
         location ^~ /picture { 
        proxy_pass http://IP:  /;
    }

         location ^~ /video { 
        proxy_pass http://IP:  /;
    }
        location ^~ /img/ {
            root     D:/Can_jpg;
        }
        location / {
            root   html;
            index  index.html index.htm;
            proxy_pass        http://192.168.13.106:7070;         
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }      
    }

}

내부 네트워크 기기 설정:
worker_processes  1;

events {
    worker_connections  1024;
}

http {
        log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                          '$status $body_bytes_sent "$http_referer" '
                          '"$http_user_agent" "$http_x_forwarded_for"';

        access_log  logs/access.log  main;

        sendfile            on;
        tcp_nopush          on;
        #     
        server {
        listen 82;
        server_name   IP;
        charset utf-8,gbk;
        root /mnt/picture;
        location / {
            autoindex on;
            autoindex_exact_size on;
            autoindex_localtime on;     
        }
        }
        server {
        listen 83;
        server_name   IP;
        charset utf-8,gbk;
        root /mnt/video;
        location / {
            autoindex on;
            autoindex_exact_size on;
            autoindex_localtime on;     
        }
        }
}

좋은 웹페이지 즐겨찾기