简要说明:
nginx简介:
反向代理:
配置文件:
server {
listen 8080;
location / {
root /root/workspace/gin-vue-dist;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location /v1 {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:8888;
rewrite ^.+v1/?(.*)$ /$1 break;
}
}
附文件服务器配置:
server {
listen 27878;
client_max_body_size 51200m;
client_body_temp_path /root/workspace/fileserver;
location / {
charset utf-8;
if ($query_string) {
expires max;
}
alias /root/workspace/fileserver/;
autoindex on;
autoindex_localtime on;
}
}