Monthly Archives: 一月 2012

js挂马

首页通过搜索引擎,点击后跳转到另外一个主页,查找php木马也查找不到,用命令发现有一个木马加密隐藏在模板里,网站是通过phpcms写的,phpcms的权限设置有点问题。导致经常中木马。 最后通过firebug发现首页里有一条访问js代码跳转到其他域名。原来是写到js脚本最后。

Posted in linux | Leave a comment

wordpress在lnmp环境下静态化

wordpress的静态化网上有以下几种方式 第一种最普遍的 location / { if (-f $request_filename/index.html){ rewrite (.*) $1/index.html break; } if (-f $request_filename/index.php){ rewrite (.*) $1/index.php; } if (!-f $request_filename){ rewrite (.*) /index.php; } } 第二种 http://www.lutuzhi.com/opensource/306.html if (!-e $request_filename) { #下面四行斜体字实现链接rewrite,http://www.lutuzhi.com中的所有页面实现了静态化  rewrite ^/(index|atom|rsd)\.xml$ http://www.lutuzhi.com last; rewrite … Continue reading

Posted in linux | Leave a comment

lftp mirror 脚本

参考文章如下网站的 http://www.centos.bz/2011/06/incremental-backup-site-using-lftp/ http://www.myamiga.com/journal/2011/03/25/using-lftp-to-mirror-content/ http://168.site90.net/doku.php?id=shell-script-mirror-ftp-sites-using-lftp #!/bin/sh /usr/bin/lftp -u admin,metcxxxx -e “mirror -svn /  /home/wwwroot/www ;exit”172.16.16.33 mirror下载目录 mirror  src  local 要指定远程路径和本地路径

Posted in linux | Leave a comment

centos awstats

参考如下文章 http://centoshelp.org/servers/configuring-awstats-multiple-domains-hosted-on-the-same-server/ 首先安装epel 和rpmforge 源 yum install  install awstats GeoIP-data perl-Geo-IP cronolog geoip的国家和城市的数据装不了要手动下载 mkdir /var/www/GeoIP; cd /var/www/GeoIP wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz gunzip GeoIP.dat.gz GeoLiteCity.dat.gz vi  /etc/httpd/conf/httpd.conf 修改日志格式 CustomLog “|/usr/sbin/cronolog  /var/log/httpd/www.xx.com.%Y%m%d.log” combined cp /etc/awstats/awstats.model.conf /etc/awstats/awstats.www.xx.com.conf vi /etc/awstats/awstats.stats.example.com.conf We will be editing … Continue reading

Posted in linux | Leave a comment