# description: Startup script for the Apache HTTP Server
(3)chkconfig --add httpd
5.apache访问日志
/usr/local/httpd/logs/access_log
二 Apache的虚拟主机
1.启用基于域名的虚拟主机
vim /usr/local/httpd/conf/httpd.conf
定位到388行,去除“#”号
conf/extra/httpd-vhosts.conf
2.配置虚拟主机文件
vim /usr/local/httpd/conf/extra/httpd-vhosts.conf
NameVirtualHost :80
<VirtualHost >
DocumentRoot /var/www/html/benetcom
ServerName www.benet.com
</VirtualHost>
<VirtualHost *>
DocumentRoot /var/www/html/accpcom
ServerName www.accp.com
</VirtualHost>
3.重启配置文件
/usr/local/httpd/bin/apachectl restart
原文地址:http://blog.51cto.com/13550558/2086219