系统相关
首页 > 系统相关> > nginx配置项目(高效急速版)

nginx配置项目(高效急速版)

作者:互联网

upstream guojiumangagehttp {
server localhost:8658;(指定服务器自己部署项目包含自己自定义的)端口号
}

server {
listen 80;
server_name ad.xxxx.com;(想要配置的域名解析好的)

   location / {
    proxy_pass        http://localhost:8658;
    proxy_set_header   Host             $host;
    proxy_set_header   X-Real-IP        $remote_addr;
    proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
}

location /qu3 {
proxy_pass http://localhost:8080/qu3;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

}

location /guojiumangage {
proxy_pass http://localhost:8080/guojiumangage;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

}

标签:高效,set,Forwarded,header,nginx,急速,proxy,pass,localhost
来源: https://blog.csdn.net/weixin_40753536/article/details/89608358