30no2's Blog.

虚拟域名配置

字数统计: 104阅读时长: 1 min
2018/05/25 Share

虚拟 域名配置

httpd.conf

1
2
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
1
2
3
4
5
6
7
8
<Directory "e:/wamp/www/">
Options FollowSymLinks
AllowOverride All
Require all granted
Order Deny,Allow
Require local
Allow from All
</Directory>

httpd-vhosts.conf

1
2
3
4
5
6
7
<VirtualHost *:80>
DocumentRoot "e:/wamp/www/xx"
ServerName www.new.com
ServerAdmin admin@example.com
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>

hosts

路径:C:\Windows\System32\drivers\etc

127.0.0.1 www.new.com

CATALOG
  1. 1. 虚拟 域名配置
    1. 1.1. httpd.conf
    2. 1.2. httpd-vhosts.conf
    3. 1.3. hosts