配置虚拟主机
备份相关配置文件
mv /usr/local/apache2/conf/extra/httpd-vhosts.conf /usr/local/apache2/conf/extra/httpd-vhosts.conf.save
mv /usr/local/apache2/conf/extra/httpd-default.conf /usr/local/apache2/conf/extra/httpd-default.conf.save
mv /usr/local/apache2/conf/extra/httpd-mpm.conf /usr/local/apache2/conf/extra/httpd-mpm.conf.save
创建3个apache相关的文件
vi /usr/local/apache2/conf/extra/httpd-vhosts.conf
NameVirtualHost *:80
ServerAdmin shake.chen@gmail.com
DocumentRoot “/data/www/wwwroot/test.com”
ServerName test.com
ServerAlias bbs.test.com
ErrorLog “logs/test.com-error_log”
CustomLog “|/usr/local/cronolog/sbin/cronolog /data/logs/access_www.test.com.%Y%m%d” combined
ServerAdmin shake.chen@gmail.com
DocumentRoot “/data/www/wwwroot/linux.com”
ServerName linux.com
相关文章
热门资讯