我今天搭建一个linux + nginx + PHP服务器 出现了一个问题我在服务器上能访问到我配置的网站,但是在其他机器上就访问不到(局域网)。试了IP地址访问也访问不到,不知道为什么?

解决方案 »

  1.   


    server {
    listen 172.17.254.216:80;
    server_name  www.test_demo.com;
    index index.php index.html index.htm  default.html;
    root /data0/htdocs/www/;
    .....
    我在本机访问www.test_demo.com 也访问不到 只能访问IP才能访问到,其他机器www.test_demo.com 和IP都访问不了 o(︶︿︶)o 唉 真不知道啥地方错了
      

  2.   

    listen 172.17.254.216:80;
    改成 listen *:80试一试,我也不太熟悉
      

  3.   

    改过了 还是无效 
    服务器:[root@localhost www]# curl www.test_demo.com                         
    curl: (6) Couldn't resolve host 'www.test_demo.com'
    [root@localhost www]# curl 172.17.254.216
    wwwwww
    其他机器我用插件爆出错
    Site found: www.test_demo.com=172.17.254.216
    Connecting to 172.17.254.216
    Error: 12002(Timeout)