我在81端口上用documentroot创建了一个虚拟主机。c:/wamp64/www/abc
.
在 httpd-vhosts.conf
:
virtualhost *:80
<VirtualHost *:80>
ServerName xyz
DocumentRoot "c:/wamp64/www"
<Directory "c:/wamp64/www">
Option +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
virtualhost *:81
<VirtualHost *:81>
ServerName abc
DocumentRoot "c:/wamp64/www/abc"
<Directory "c:/wamp64/www/abc">
Option +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
在 httpd.conf
:
Listen 0.0.0.0:80
Listen [::0]:80
Listen 0.0.0.0:81
Listen [::0]:81
localhost/xyz
和 10.11.9.48/xyz
是无障碍的。
localhost:81
是无障碍的,但 10.11.9.48:81
不是。