反向代理-不同端口或域名
<p>我们的项目开发域名为端口号8888,需要通过访问域名nginx.huangminhang.cn直接访问项目:</p>
<pre><code>server {
listen 80;
server_name nginx.huangminhang.cn;
location / {
proxy_pass http://127.0.0.1:8888;
root html; #此处修改为项目文件夹根目录
index index.html index.htm;
}
}</code></pre>