httpd 安装详解
安装httpd:
rpm包:CentOS发行版中直接提供
编译安装:定制新功能,或其它原因
安装方式:
yum install httpd
CentOS 6:httpd-2.2
程序环境:
配置文件:
/etc/httpd/conf/httpd.conf/httpd
/etc/httpd/conf.d/*.conf
服务脚本:
/etc/rc.d/init.d/httpd
脚本配置文件:/etc/sysconfig/httpd
主程序文件:
/usr/sbin/httpd
/usr/sbin/httpd.event
/usr/sbin/http.worker
日志文件:
/var/log/httpd
access_log:访问日志
error_log:错误日志
站点文档:
/var/www/html
模块文件路径:
/usr/lib64/httpd/modules
注:查看httpd的安装文件及路径的方式:
rpm -ql httpd |less
服务控制和启动:
chkconfig httpd on|off
service {start|stop|restart|status|configtest|reload} httpd
CentOS 7:
程序环境:
配置文件:
/etc/httpd/conf/httpd.conf
/etc/httpd/conf.d/*.conf
模块相关的配置文件:/etc/httpd/conf.modules.d/*.conf
systemd unit file:
/usr/lib/systemd/system/httpd.service
主程序文件:
/usr/sbin/httpd
httpd-2.4支持MPM的动态切换
日志文件:
/var/log/httpd
access_log:访问日志
error_log:错误日志
站点文档:
/var/www/html
模块文件路径:
/usr/lib64/httpd/modules
服务控制:
systemctl enable|disable httpd.service
systemctl {start|stop|restart|status} httpd.service
httpd-2.2的常用配置:
转载于:https://blog.51cto.com/chinaxin/1892633