海运的博客

Apache/PHP/Mysql/Nginx编译参数查看

发布时间:June 20, 2012 // 分类:Apache,Nginx,PHP,数据库 // No Comments

查看Nginx编译参数:

/usr/local/nginx/sbin/nginx -V

查看Apache编译参数:

cat /usr/local/apache/build/config.nice

查看PHP编译参数:

/usr/local/php/bin/php -i |grep configure

查看Mysql编译参数:

cat /usr/local/mysql/bin/mysqlbug|grep configure

此内容被密码保护

发布时间:June 20, 2012 // 分类:VPN // No Comments

请输入密码访问

IIS6开启配置网页gzip压缩

发布时间:June 20, 2012 // 分类:IIS // No Comments

现在浏览器都支持gzip压缩,网站开启gzip压缩可提高用户访问速度并节省服务器带宽,IIS6自带gzip压缩支持,不过设置有点麻烦。
1.打开IIS管理器——网站——属性——服务,选择动态或静态压缩支持。
IIS6开启gzip压缩.png
2.新建web服务器扩展,文件为C:\WINDOWS\system32\inetsrv\gzip.dll。
IIS6新建gzip扩展.png
3.停止IIS服务:

iisreset.exe /stop

4.编辑IIS配置文件C:\Windows\System32\inetsrv\MetaBase.xml,找到以下并修改:

<IIsCompressionScheme    Location ="/LM/W3SVC/Filters/Compression/gzip"
        HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
        HcCreateFlags="0"
        HcDoDynamicCompression="TRUE" #开启动态文件压缩
        HcDoOnDemandCompression="TRUE"
        HcDoStaticCompression="TRUE" #开启静态文件压缩
        HcDynamicCompressionLevel="9" #动态文件压缩级别,可选0-10,0为不压缩,数值越大压缩超高,越占用CPU。
        HcFileExtensions="htm #静态文件压缩扩展名
            html
            css
            js
            txt"
        HcOnDemandCompLevel="9" #静态文件压缩级别
        HcPriority="1"
        HcScriptFileExtensions="asp #动态态文件压缩扩展名
            dll
            exe"
    >
</IIsCompressionScheme>

5.重新启动IIS服务:

iisreset.exe /start

6.测试压缩:
测试IIS6压缩.png

此内容被密码保护

发布时间:June 19, 2012 // 分类:Xshell // No Comments

请输入密码访问

Iptables模块recent错误iptables: Unknown error 18446744073709551615解决

发布时间:June 9, 2012 // 分类:Iptables // No Comments

Iptablesrecent用做防CC效果很好,刚刚在调整单个IP跟踪数据包数量时遇到以下错误 :

iptables: Unknown error 18446744073709551615
iptables: Unknown error 18446744073709551615
iptables: Unknown error 4294967295
iptables: Unknown error 4294967295

查看recent模块已正常加载:

#https://www.haiyun.me
lsmod |grep recent
ipt_recent             42969  3 
x_tables               50505  7 ipt_recent,xt_state,ip_tables,ipt_LOG,ipt_REJECT,xt_tcpudp,ip6_tables

查看recent模块信息:

modinfo ipt_recent
filename:       /lib/modules/2.6.18-274.17.1.el5/kernel/net/ipv4/netfilter/ipt_recent.ko
license:        GPL
description:    IP tables recently seen matching module
author:         Patrick McHardy <kaber@trash.net>
srcversion:     9847889C4459A1E24A45527
depends:        x_tables
vermagic:       2.6.18-274.17.1.el5 SMP mod_unload gcc-4.1
parm:           ip_list_tot:number of IPs to remember per list (uint)
parm:           ip_pkt_list_tot:number of packets per IP to remember (max. 255) (uint)
parm:           ip_list_hash_size:size of hash table used to look up IPs (uint)
parm:           ip_list_perms:permissions on /proc/net/ipt_recent/* files (uint)
module_sig:    883f3504fcc2b231298695ef90fd4f112a58709f465f6d2b473f085774c22f4a44af8d9d414232609f77c48b61f17dd712e95188f337230fc3ef7a243

可见recent最大跟踪IP及数据包数量可以调整的,设置最大跟踪数据包为100:

cat >> /etc/modprobe.conf <<EOF
options ip_pkt_list_tot=100
EOF

重新加载recent模块:

/etc/init.d/iptables stop
modprobe -r ipt_recent
modprobe  ipt_recent
/etc/init.d/iptables start

再次调整参数,一切正常。

分类
最新文章
最近回复
  • 海运: 恩山有很多。
  • swsend: 大佬可以分享一下固件吗,谢谢。
  • Jimmy: 方法一 nghtp3步骤需要改成如下才能编译成功: git clone https://git...
  • 海运: 地址格式和udpxy一样,udpxy和msd_lite能用这个就能用。
  • 1: 怎么用 编译后的程序在家里路由器内任意一台设备上运行就可以吗?比如笔记本电脑 m参数是笔记本的...
  • 孤狼: ups_status_set: seems that UPS [BK650M2-CH] is ...
  • 孤狼: 擦。。。。apcupsd会失联 nut在冲到到100的时候会ONBATT进入关机状态,我想想办...
  • 海运: 网络,找到相应的url编辑重发请求,firefox有此功能,其它未知。
  • knetxp: 用浏览器F12网络拦截或监听后编辑重发请求,修改url中的set为set_super,将POS...
  • Albert: 啊啊啊啊啊啊啊啊啊 我太激动了,终于好了英文区搜索了半天,翻遍了 pve 论坛没找到好方法,博...