作者:@ouyang
发布时间:2015年06月23日
阅读: 3,481
分类:Linux摘要,学习笔记
淘宝Tengine很早就有concat,但apache的concat有致命的缺陷可能导致php文件直接被下载(未经测试),所以一直没敢使用。
今天偶然发现国人修改的concatx,所以将其编译进服务器,问题貌似还是有(无法使用?v版本号),但已经非常不错了。
编译apache的concatx模块:
wget http://ajaxs.sinaapp.com/apache/modconcat/mod_concatx.c
ln -s /usr/local/apache/bin/apxs /usr/local/bin/apxs
apxs -c mod_concatx.c
编译安装concatx模块
apxs -iac mod_concatx.c
编译过程中会自动安装在apache模块目录中,并且conf/httpd.conf配置文件也会自动加上concatx的配置信息。
重启httpd
service httpd restart
查看httpd已经加载的模块
httpd -M
//在最后可以看到
concatx_module (shared)
这说明已经安装成功!可以正常使用了!
请求参数需要用两个问号('??')例如:
http://example.com/??style1.css,style2.css,css/style3.css,js/js.js
说明:concatx使用过程中如果当前目录下有index.php或index.html将无法使用。
作者:@ouyang
发布时间:2015年06月09日
阅读: 3,451
分类:学习笔记
{if !empty($description)}
摘要:{$description}
{/if}
if判断如$description不为空的情况下执行代码!
作者:@ouyang
发布时间:2015年06月02日
阅读: 3,699
分类:Linux摘要
随着沃通的SSL证书免费,而且还有免费就3年的SSL证书,都是基于域名的。所以独立IP限制就不是那么重要了。
Directadmin开启SSL支持很简单!
第一步:
[root@localhost ~]sed -i '$a enable_ssl_sni=1' /usr/local/directadmin/conf/directadmin.conf
执行后可以用cat查看最尾有没有enable_ssl_sni=1,当然也可以手工vi加入!
阅读剩余部分...
作者:@ouyang
发布时间:2015年05月14日
阅读: 3,575
分类:日积月累
腾讯基因里面就没有“服务”这两个字。
1、云技术落后,无法升级产品。
2、企业高大上,不顾客户感受。
3、无客服热线,只能在线咨询。
腾讯云的高姿态,必将注定失败!祝愿腾讯云一路走好。
作者:@ouyang
发布时间:2015年05月12日
阅读: 3,373
分类:Linux摘要
因为百度云服务器默认没有设置swap文件,所以需要建立一个swap交换空间。
第一步,执行建立swap一个8GB的交换文件
[root@localhost /]# dd if=/dev/zero of=swapfile bs=1024 count=8192000
8388608+0 records in
8388608+0 records out
8589934592 bytes (8.6 GB) copied, 33.4684 s, 257 MB/s
过十几秒钟,就建立OK了。
接下来执行:
[root@localhost /]# mkswap swapfile #在swapfile文件上建立交换分区
[root@localhost /]# swapon swapfile #激活swapfile文件
好了,swap文件到此激活完成。
[root@localhost /]# free -m
total used free shared buffers cached
Mem: 3830 3712 118 0 12 3491
-/+ buffers/cache: 207 3622
Swap: 7999 0 7999
可以看到swap已经生效了。
下步就是启动自动挂在了。
[root@localhost /]# vi /etc/fstab
最末行加入
/swapfile swap swap defaults 0 0
保存OK。
- «
- 1
- ...
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- ...
- 29
- »