流星 发布的文章

流星

PHPWIND8.7 配置NGINX伪静态规则

location /{ rewrite ^(.*)-htm-(.*)$ $1.php?$2 last; rewrite ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/thread.php?fid=$1 last; rewrite ^(.*)u/([0-9]+)$ $1u.php?uid=$2 last; rewrite ^(.*)/bbs.html$ $1/index.php?m=bbs last; rewrite ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?...

将Centos的yum源更换为国内的阿里云源

阿里云Linux安装软件镜像源阿里云是最近新出的一个镜像源。得益与阿里云的高速发展,这么大的需求,肯定会推出自己的镜像源。 阿里云Linux安装镜像源地址:http://mirrors.aliyun.com/CentOS系统更换软件安装源 1、备份你的原镜像文件,以免出错后可以恢复。mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup2:下载新的CentOS-Base.repo 到/etc/yum.repos.d/ CentOS 5 执行下面wget -O /etc/yum.repos....

502 Bad Gateway 自动重启脚本

一个简单的脚本,用来监控502的,如果遇到502,自动重启PHP进程。适用于LNMPA环境。以下文件,存放于 /root 或其它目录:#!/bin/bash MY_URL="http://b.ay.lc/" RESULT=curl -I $MY_URL|grep "HTTP/1.1 502" if [ -n "$RESULT" ]; then /root/lnmpa restart fi给予可执行权限:chmod +x /root/php.sh通过 crontab 设置自动运行:crontab -e* * * * * ...