wamp服务器在线供任何人访问

时间:2016-09-16 13:49:22

标签: apache wamp

您一直在尝试设置一个wamp服务器,以便人们可以访问它进行测试 一切正常在我的电脑上,我相信我已经设置正确,但没有人可以连接到网站,因为它无法到达

我在路由器和防火墙上打开了端口80

我的主机文件如下

        127.0.0.1       localhost
    ::1             localhost
127.0.0.1                   bandicam.com
127.0.0.1                   ssl.bandisoft.com
127.0.0.1                   btcGame.local
    ::1             btcGame.local

我的httpd-vhosts.conf如下

    #
# Virtual Hosts
#
<VirtualHost *:80>
    DocumentRoot "g:/wamp/www"
    ServerName localhost
    ServerAlias localhost
    ErrorLog "logs/localhost-error.log"
    CustomLog "logs/localhost-access.log" common
    <Directory  "G:/wamp/www">
        AllowOverride All
        Options Indexes FollowSymLinks
        Require local
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName btcGame.local
    ServerAlias www.btcGame.local
    DocumentRoot "c:/wamp64/www/btcgame"
    ErrorLog "logs/btcGame-error.log"
    CustomLog "logs/btcGame-access.log" common
    <Directory  "/">
        Options +Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

为了让我的网站在线,还有其他需要改变的地方吗?

1 个答案:

答案 0 :(得分:0)

尝试访问您计算机的其他人应该知道在哪里查看。

然后应在其计算机的hosts文件中引用您的服务器,但IP应该是可解析的,例如

your.local.ip         btcGame.local