教学之友,学习之友。

站长教学网

  • [linux服务器] Linux下如何使用shell查找PHP中的木马 日期:2013-01-10 16:05:02 点击:135 好评:0

    查找PHP 木马代码 输出到文本文件,具体搜索内容可以自行修改。 find./-name*.php|xargsegrepphpspy|c99sh|milw0rm|eval\(gunerpress|eval\(base64_decoolcode|spider_bc/tmp/php.txt grep-r--include=*.php'[^a-z]eval($_POST'./...

  • [linux服务器] linux下如何使用vim命令新建和编辑UTF-8文件 日期:2013-01-09 09:27:28 点击:548 好评:0

    实例系统为centos6 操作系统环境变量:LC_ALL=zh_CN.GBK, LANG=zh_CN.GBK 第一种办法,设定.vimrc文件: 在/home/username/.vimrc或者/root/.vimrc下增加两句话: let termencoding=encoding set fileencodings=utf-8,gbk...

  • [linux服务器] [原创]nginx域名/二级域名根目录404跳转,其下属页面正常访问。 日期:2013-01-06 14:03:22 点击:1042 好评:2

    为什么要拿这个出来说呢?今天做了个为静态重写,需求是想二级域名的根目录是要出现404跳转的,而其下属页面是正常访问的。可是根目录下就一直也是200状态,代码如下: if ($hos...

  • [linux服务器] nginx实现if嵌套判断 日期:2013-01-06 13:48:18 点击:1402 好评:2

    nginx的配置中不支持if条件的逻辑与/逻辑或运算 ,并且不支持if的嵌套语法,我们可以用变量的方式来实现: 首先是伪代码(即不被nginx支持),写在这里只是为了方便理解: if ($re...

  • [linux服务器] nginx重写rewrite的[emerg] unknown directive "if"?错误 日期:2013-01-06 13:43:57 点击:1320 好评:-4

    写了个if判断规则,结果报以上错误,原来nginx语法检测特别严格,if和后面括号以及变量等号这些元素都要有空格,所以正确的写法是: if ($ip= 1 ) { rewrite^(.*)$http: //www.eduyo.com$1permanen...

  • [linux服务器] Nginx利用头信息User-Agrent禁止访问返回404等 日期:2013-01-06 13:35:06 点击:313 好评:0

    有时候为了禁止某种访问者可以使用nginx 的if 和 $http_user_agent来区分判断 如: location/{ root/home/www/; if($http_user_agent~*yahoo){ return404; } } 然后重启 nginx: nginx -s reload 可以用 curl 测试一下 cu...

  • [linux服务器] squid如何设置页面缓存时间 日期:2012-12-27 23:00:33 点击:434 好评:0

    首先搞清楚2个东西: 1、Last-Modified:这个是网页最后修改的时间。可在head中设置。squid在将页面缓存时,如果没有设置该属性,squid会自动将Last-Modified设置为访问时间。 2、Expires:网页...

  • [linux服务器] 如何使用命令查询RPM包的安装位置 日期:2012-12-27 10:36:05 点击:286 好评:0

    第一步:查询已经安装的RPM包。 rpm -qa | grep -i mysql --其中mysql是查询关键字 MySQL-ndb-storage-4.1.12-1 MySQL-devel-4.1.12-1 MySQL-Max-4.1.12-1 perl-DBD-MySQL-2.9004-3.1 MySQL-ndb-extra-4.1.12-1 qt-MySQL-3.3.3-9.3 mysq...

  • [linux服务器] CentOS安装Squid搭建HTTP Proxy代理服务器 日期:2012-12-26 17:29:32 点击:2620 好评:2

    ecntos6,Squid2.6 1. Squid安装配置 # yum install squid 修改/etc/squid/squid.conf, 加入: -------------- cache_dir /var/spool/squid 100 16 256 acl manager proto cache_object acl localhost src 127.0.0.1/255.255.255.255 acl all src 0...

  • [linux服务器] CentOS如何安装squid代理服务器 日期:2012-12-26 17:26:45 点击:351 好评:0

    centos6 squid2.6 yum install squid 一、正向代理 1、先备份配置文件 cp /etc/squid/squid.conf /etc/squid/squid.conf.bak 2、编辑配置文件 vim /etc/squid/squid.conf 修改: http_access deny all 为: http_access allow all 允...

栏目列表
本周热点