问题描述
配置文件
server {listen 8899;server_name tc.com;location / { root html; index index.html index.htm; } }
浏览器访问tc.com:8899没用,但是使用localhost:8899有用,这是为什么?
问题解答
回答1:我怀疑你不知道 DNS 和 域名 还有 server_name 是什么区别
回答2:忘改hosts了

问题描述
配置文件
server {listen 8899;server_name tc.com;location / { root html; index index.html index.htm; } }
浏览器访问tc.com:8899没用,但是使用localhost:8899有用,这是为什么?
问题解答
回答1:我怀疑你不知道 DNS 和 域名 还有 server_name 是什么区别
回答2:忘改hosts了
相关文章:1. express - nginx配置后访问不到主动ajax请求?2. nginx location 匹配/status和/status/,这两个有什么区别?3. django i18n 切换语言能在runserver下工作,当用apache时就不正常工作 求大神帮助??4. nginx location 规则是来匹配$uri这个量的吧?5. nginx+nodejs6. apache 的 aliases,redirecting,rewriting 都有什么区别?7. openresty - 利用lua-nginx-module修改upstream中内容并重新reload8. 301重定向 - nginx二级域名重定向到目录9. nginx的server_name匹配二级域名问题10. apache htaccess重定向规则求助

网公网安备:皖ICP备2020019022号-8 Copyright ¢ 2020-2025 Powered by V1.8 All Rights Reserved 技术支持:乐呵呵网
声明:本站所有资源以学习为主