在 nginx.conf 配置文件中增加如下配置:
server {
listen 80;
server_name www.123.com;
location / {
proxy_pass http://127.0.0.1:8080;
index index.html index.htm index.jsp;
}
}
这篇博客介绍了如何在Nginx配置文件中设置一个服务器块,监听80端口,并将请求代理到本地的8080端口,通过www.123.com域名访问。配置包括了基本的server_name和location指令,确保静态文件的正确索引。
在 nginx.conf 配置文件中增加如下配置:
server {
listen 80;
server_name www.123.com;
location / {
proxy_pass http://127.0.0.1:8080;
index index.html index.htm index.jsp;
}
}
956
3581
1565

被折叠的 条评论
为什么被折叠?