apache虚拟主机的配置文件httpd-vhosts.conf
配置文件目录:/apache1/conf/extra/httpd-vhosts.confhttpd-vhosts.conf文件中:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# grep -v "#" httpd-vhosts.conf |grep -v "^$"
NameVirtualHost *:80 //端口*代表所有地址
<VirtualHost *:80> //一个网络
ServerAdmin changhuanyan-ghq@sinosig.com //邮箱
DocumentRoot "/usr/local/apache2/htdocs/www1/"
ServerName //域名
ErrorLog "logs/error_log"
CustomLog "logs/access_log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin changhuanyan-ghq@sinosig.com
DocumentRoot "/usr/local/apache2/htdocs/www2/"
ServerName www.changhuanyan2.com
ErrorLog "logs/error_log"
CustomLog "logs/access_log" common
</VirtualHost>
页:
[1]