Apache配置多个网页服务器,apache配置多个
Apache配置多个网页服务器,apache配置多个
cd /usr/local/apache2/
vim conf/extra/httpd-vhosts.conf
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin lintengfeidemaozi@163.com
DocumentRoot "/data/webapp/vv1/"
ServerName vv1.com
<Directory "/data/webapp/vv1">
AllowOverride all
#option -Indexes of FollowSymlinks
Order allow,deny
Allow from all
</Directory>
ErrorLog logs/error_log
CustomLog logs/access_log common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin lintengfeidemaozi@163.com
DocumentRoot "/data/webapp/vv2/"
ServerName vv2.com
<Directory "/data/webapp/vv2">
AllowOverride all
#option -Indexes of FollowSymlinks
Order allow,deny
Allow from all
</Directory>
ErrorLog logs/error_log
CustomLog logs/access_log common
</VirtualHost>
还要在主配置文件httpd.conf中有这样一句:
Include conf/extra/httpd-vhosts.conf
主配置文件默认将它注释,删掉开头的#号。
评论暂时关闭