【发布时间】:2018-03-01 21:46:18
【问题描述】:
我用 nginx 做了一个virtual host,我已经添加到host:
127.0.0.1 testapp
虚拟主机http://testapp 在我的VPS 上可用,但无法通过互联网访问:
server {
listen 80;
server_name testapp testapp.51.x.x.172;
##root html;
root c:/apps/web;
index index.html index.htm;
}
【问题讨论】:
-
你试过代理反向吗?
-
为什么可以通过互联网访问?您需要完成域和 DNS 解析设置,才能从 Internet 访问您的服务器
-
亲爱的 @tarun-lalwani 我有静态 IP 地址和 Domian。但仍然无法正常工作。
-
你得到什么错误?
-
我使用这个网址:
testapp.51.x.x.172,但找不到页面。
标签: nginx virtualhost