Apache 虚拟主机多域名配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<VirtualHost *:80>
# 应用目录
DocumentRoot "/var/www/html/yxbk-tp6/public"

# 待配置的域名
ServerName yxbk.werty.cn

# 错误日志位置
ErrorLog "logs/yxbk.werty.cn-error.log"

# 权限日志
CustomLog "logs/yxbk.werty.cn-access.log" common


<Directory "/var/www/html/yxbk-tp6/pub" >

Options FollowSymLinks

AllowOverride all

Order deny,allow

Deny from allow

</Directory>

</VirtualHost>