PHP + Apache 环境搭建

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值