1.ServerRoot: apache httpd 服务器程序路径
2.Listen 多个网站对应多个端口
3.php可以自动解析双引号里的变量,但代码量一旦增加,就会带来性能上的损耗,推荐使用单引号,例如:$str = 'hello'; echo "$str world";可以优化成:echo $str.' world';
4.自定义服务myhttpd后启动报错:
4.1 DocumentRoot must be a direcotory.这里DocumentRoot指的是php站点开发目录。
4.2 the apache service named reported the follow error: SSLCertificatefile no exist or is empty 这里是因为http.conf配置中使用了ssl安全模块,直接注释掉以下行即可! #Include conf/extra/httpd-ahssl.conf 详细ssl生成证书请看链接:http://help.aliyun.com/knowledge_detail/6703512.html?pos=20
4.3 如果用户没有配置ssl,即可通过http访问,那么数据传输有安全风险。
5.自定义服务myhttpd:httpd.exe -k install -n "service_name" -f "httpd.conf文件路径"
卸载:httpd -k uninstall -n "service_name"
6.apache httpd 版本跟php版本要对应上,否则会出现php5apache2.dll载入http错误。
详见http://www.cnblogs.com/Sabre/p/3732882.html
当前httpd 版本2.4.17,php 5.4.45 TS.