域名解析+nginx问题,求大神来解答

qq_23258551 2017-12-20 05:59:52
公司服务器做了内外网之分,外网不能通过ip访问,做了内网穿透,通过域名+开放端口访问,由nginx监听,现在有个问题就是域名解析只能用隐性url,但是nginx只能访问首页,地址后面跟的地址无法解析,怎么办,
比如 followme.gfline.com/partner-recruitment.html
直接解析了 followme.gfline.com 跳到了首页,而后面的 partner-recruitment.html 没效果。
...全文
720 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
qq_23258551 2018-01-25
  • 打赏
  • 举报
回复
引用 6 楼 xuzuning 的回复:
我说的是为什么是 http“//ollowme.gfline.com/partner-recruitment.html 为不是 http://ollowme.gfline.com:8087/partner-recruitment.html
http“//followme.gfline.com" 已经含有8087了,用的是隐形解析,
StudyForFuture 2018-01-17
  • 打赏
  • 举报
回复
为嘛 我做了端口映射后可以直接绑定域名 - -
xuzuning 2018-01-17
  • 打赏
  • 举报
回复
我说的是为什么是 http“//ollowme.gfline.com/partner-recruitment.html 为不是 http://ollowme.gfline.com:8087/partner-recruitment.html
qq_23258551 2018-01-17
  • 打赏
  • 举报
回复
引用 3 楼 xuzuning 的回复:
改了端口?怎么没反应在 url 中?
实际上地址还是显示的8087,后面那个8111是apache监听的,先是nginx监听8087,然后转给apache的8111;
qq_23258551 2018-01-17
  • 打赏
  • 举报
回复
引用 3 楼 xuzuning 的回复:
改了端口?怎么没反应在 url 中?
不大懂你说的意思,(proxy_pass http://followme.gfline.com:8111/;) 这里是跳转到apache的监听端口了
xuzuning 2018-01-17
  • 打赏
  • 举报
回复
改了端口?怎么没反应在 url 中?
qq_23258551 2018-01-17
  • 打赏
  • 举报
回复
server { listen 8087; server_name followme.gfline.com; index index.html index.htm; location / { proxy_pass http://followme.gfline.com:8111/; } location /.(htm|html|map|gif|jpg|jpeg|png|bmp|swf|ioc|rar|zip|txt|flv|mid|doc|ppt|pdf|xls|mp3|wma)$ { proxy_pass http://followme.gfline.com:8111/; root "/var/www/html/followme/public"; # try_files $uri $uri/ /index.php?$query_string; try_files $uri $uri/ /index.html =404; # proxy_redirect off; # proxy_set_header Host $host; # proxy_set_header X-Real-IP $remote_addr; # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # proxy_pass http://branch.followme.org:8011; } location ~ .*\.(htm|html|map|gif|jpg|jpeg|png|bmp|swf|ioc|rar|zip|txt|flv|mid|doc|ppt|pdf|xls|mp3|wma)$ { root "/var/www/html/followme/public"; # try_files $uri $uri/ /index.php?$query_string; try_files $uri $uri/ /index.html =404; # proxy_redirect off; # proxy_set_header Host $host; # proxy_set_header X-Real-IP $remote_addr; # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # proxy_pass http://branch.followme.org:8011; } }
二尸兄 2017-12-21
  • 打赏
  • 举报
回复
nginx 配置可否贴出来看一下,多半是nginx配置错误

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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