Author Archives: admin

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

centos setup 配置工具

yum install setup  system-config-firewall   system-config-firewall-tui   system-config-services  system-config-network-tui   ntsysv ntsysv 才能出来配置服务选项

Posted in linux | Leave a comment

date

delday=$(date -d “7 days ago” +%Y%m%d)

Posted in 日记 | Leave a comment

centos6 yum 时出现[Errno 14] PYCURL ERROR 6 – “”

[Errno 14] PYCURL ERROR 6 – “” 竟然是nameserver的问题 用google的dns

Posted in linux | Leave a comment

windows 下载网站

http://msdn.itellyou.cn/

Posted in windows | Leave a comment

禁止win7驱动签名

bcdedit/set testsigning on

Posted in windows | Leave a comment

dede挂马处理

一个虚拟主机网站被挂马 dede做的 用php挂的马也删除不掉、发现是在templates里的!!手动删除 重新生成首页

Posted in linux | Leave a comment

windows 2008 http500

今天2008突然报http500错误查看系统日志发现用户www无法 访问目录 重新设置www密码更改网站的配置

Posted in windows | Leave a comment