关于nginx配置

Freefish1994 2018-12-01 09:14:56
server{
listen 80;
server_name www.helloworld.com;

if (!-e $request_uri) {
rewrite ^ http://www.helloworld.com/website/jxjt/index.shtml permanent;
}
location / {
proxy_pass http://ip:port/应用名称;
}

}


我想实现的是在访问www.helloworld.com这个域名时实际发送http://ip:port/应用名称/website/jxjt/index.shtml这个请求
向上面这样配不行,有大神知道该如何配置吗?
...全文
258 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
yf_mood 2018-12-04
  • 打赏
  • 举报
回复
引用 楼主 Freefish1994 的回复:
server{
listen 80;
server_name www.helloworld.com;

if (!-e $request_uri) {
rewrite ^ http://www.helloworld.com/website/jxjt/index.shtml permanent;
}
location / {
proxy_pass http://ip:port/应用名称;
}

}


我想实现的是在访问www.helloworld.com这个域名时实际发送http://ip:port/应用名称/website/jxjt/index.shtml这个请求
向上面这样配不行,有大神知道该如何配置吗?

1,220

社区成员

发帖
与我相关
我的任务
社区描述
企业软件 中间件技术
社区管理员
  • 中间件
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧