我必须使用vhost在本地网络中打开我的网页。
SERVER PC httpd-vhosta.conf文件:
<VirtualHost *:80>
ServerName test.tomka
ServerAlias test.tomka
DocumentRoot C:/wamp/www/a
<Directory "C:/wamp/www/a">
Options Indexes FollowSymLinks MultiViews
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
主持文件:
127.0.0.1 test.tomka
的httpd.conf
Listen 0.0.0.0:80
Listen [::0]:80
Listen 80
ServerName localhost:80
HostnameLookups Off
<Directory />
AllowOverride none
Require all granted
Require ip 192.168.13
Require ip 192.168.0
</Directory>
<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks
AllowOverride all
Require local
Require ip 192.168.13
Require ip 192.168.0
</Directory>
客户端PC 托管文件:
192.168.0.150 test.tomka
(this is server IP
)
我可以使用IP地址打开网页,但是当我使用test.tomka时,网页无法打开。