74 Star 524 Fork 210

hanting / rust-admin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
nginx.conf.default 875 Bytes
一键复制 编辑 原始数据 按行查看 历史
hanting 提交于 2020-01-28 14:12 . 添加部分注释
server {
listen 80; #nginx监听端口
server_name admin.rs; #对外域名
root your_path; #静态相关文件的目录位置
location /static/ { #请
root your_static_path; #请将pulic目录设置此处
}
location / {
proxy_pass http://127.0.0.1:8081/; #后台rust-admin的监听地址及端口
proxy_set_header Host $host;#保留代理之前的host
proxy_set_header X-Real-IP $remote_addr; #保留代理之前的真实客户端ip
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header HTTP_X_FORWARDED_FOR $remote_addr; #在多级代理的情况下,记录每次代理之前的客户端真实ip
proxy_redirect default; #指定修改被代理服务器返回的响应头中的location头域跟refresh头域数值
}
}
Rust
1
https://gitee.com/houhanting/rust-admin.git
git@gitee.com:houhanting/rust-admin.git
houhanting
rust-admin
rust-admin
master

搜索帮助