nginx配置本地静态资源

server {
        listen       12001;
        server_name  localhost;

        location / {
            root   C:\opt\upload\file;
            index  index.html index.htm;
        }
    }

然后Java再调用

 location /file/{
            proxy_pass http://localhost:12001/;
            proxy_set_header Host $host:$server_port; 

        }

你可能感兴趣的:(nginx,运维,服务器)