Apache2配置文件详解(4)-虚拟主机配置httpd-vhost.conf

Apache 1689℃
#这里重点介绍一下基于多端口的配置
NameVirtualHost *:81
NameVirtualHost *:82
NameVirtualHost *:83

<VirtualHost *:81>
ServerAdmin jafy@jafy00.com
DocumentRoot /www1
ServerName www.jafy00.com
ErrorLog logs/www1-error.log
CustomLog logs/www1-access_log common
</VirtualHost>

<VirtualHost *:82>
<Directory "/www2" >
Options FollowSymLinks
#Deny from all
Allow from all
</Directory>
ServerAdmin jafy@jafy00.com
DocumentRoot /www2
ServerName www.jafy00.com
DirectoryIndex index.php index.html
ErrorLog logs/www2-error.log
CustomLog logs/www2-access_log combined
</VirtualHost>

转载请注明:零五宝典 » Apache2配置文件详解(4)-虚拟主机配置httpd-vhost.conf