javascript - When multiple virtual hosts are configured under WAMP, how can other computers control which website they access?
PHP中文网
PHP中文网 2017-06-10 09:47:24
0
1
565

Configure two vhosts under httpd-vhosts.conf

<VirtualHost *:80>
    DocumentRoot "G:\PhpDemo"
    ServerName "localhost"
    <Directory "G:\PhpDemo">
        Options Indexes FollowSymLinks
        AllowOverride all
        Require all granted 
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "G:\MVC"
    ServerName "www.mvc.com"
    <Directory "G:\MVC">
        Options Indexes FollowSymLinks
        AllowOverride all
        Require all granted 
    </Directory>
</VirtualHost>

The corresponding configuration has also been added to the Windows host file

127.0.0.1       localhost
127.0.0.1       www.mvc.com

But other computers access this machine or localhost through IP. How to let other machines access www.mvc.com?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
Peter_Zhu

Other machines need to be bound to the host of your machine’s IP. The domain name is www.mvc.com

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template