您的位置:首页 > 健康 > 养生 > 简单使用nginx

简单使用nginx

2025/8/14 19:56:47 来源:https://blog.csdn.net/m0_65360496/article/details/140696690  浏览:    关键词:简单使用nginx

打开下载的nginx文件夹下的。。具体地址

打开并编辑nginx.conf文件

 server {listen       8089;//访问端口号server_name  localhost;//访问地址#charset koi8-r;#access_log  logs/host.access.log  main;location / {root   D:/development/dist/;//dist包地址index  index.html index.htm;}
location /dagl {alias   D:/development/dist;//第二个代理dist包地址index  index.html index.htm;}location /jeecgboot {proxy_set_header Host $http_host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header REMOTE-HOST $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_pass http://x.x.x.x:8080/jeecg-boot/;//后端服务器地址}

重启nginx命令

nginx -s reload

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com