Nginx简单的代理配置

来源:互联网 发布:张大奕的淘宝店质量 编辑:程序博客网 时间:2024/06/07 16:21

核心配置代码

找到Nginx的配置文件nginx.conf,修改配置,主要添加了proxy_pass参数。

#将请求"http:127.0.0.1:80/helloworld" 转向服务器 "http://127.0.0.1:8081"server {        listen       80;        server_name  127.0.0.1;        location /helloworld {             proxy_pass     http://127.0.0.1:8081; # 表明了所代理的服务器 }
原创粉丝点击