
server {
listen 端口号;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root 要访问文件所存放的地址;
index index.html index.htm;
proxy_set_header Host $host;
}
# 跨域请求
location /prod-api {
root 要访问文件所存放的地址;
proxy_pass 请求的地址;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root 要访问文件所存放的地址;
}
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)