centos 安装 apache httpd 支持php 和 rewrite
安装
yum install httpd httpd-devel mod_ssl
查看版本
httpd -v
启动
service httpd start
更改 /etc/httd/conf 中的 httpd.config
1 更改默认路径
DocumentRoot "/var/www/html" 为 DocumentRoot "/usr/local/zblog"
2 添加模块
#支持php
LoadModule php5_module modules/libphp5.so
#支持重定向 伪静态
LoadModule rewrite_module modules/mod_rewrite.so
AllowOverride All
支持 php扩展名
DirectoryIndex index.html index.php
AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php .php
service httpd restart