Posts Tagged ‘ nginx服务器 ’
这几天玩玩ECSHOP,但服务器安装的是nginx,ECSHOP默认规则是APP下的重写。然后就慢慢一个一个全部修改了,o(︶︿︶)o。 if (!-e $request_filename) { rewrite “^/index\.html” /index.php last; rewrite “^/category$” /index.php last; rewrite “^/feed-c([0-9]+)\.xml$” /feed.php?cat=$1 last; rewrite “^/feed-b([0-9]+)\.xml$” /feed.php?brand=$1 last; rewrite “^/feed\.xml$” /feed.php last; rewrite “^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$” /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8 last; rewrite “^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*)\.html$” /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5 last; rewrite “^/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$” /category.php?id=$1&brand=$2&page=$3&sort=$4&order=$5 last; rewrite “^/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$” /category.php?id=$1&brand=$2&page=$3 last; rewrite “^/category-([0-9]+)-b([0-9]+)(.*)\.html$” /category.php?id=$1&brand=$2 last; rewrite “^/category-([0-9]+)(.*)\.html$” /category.php?id=$1 last; rewrite “^/goods-([0-9]+)(.*)\.html” /goods.php?id=$1 last; rewrite “^/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$” /article_cat.php?id=$1&page=$2&sort=$3&order=$4 last; rewrite “^/article_cat-([0-9]+)-([0-9]+)(.*)\.html$” /article_cat.php?id=$1&page=$2 last; rewrite “^/article_cat-([0-9]+)(.*)\.html$” /article_cat.php?id=$1 last; rewrite “^/article-([0-9]+)(.*)\.html$” /article.php?id=$1 last; rewrite “^/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html” /brand.php?id=$1&cat=$2&page=$3&sort=$4&order=$5 last; rewrite “^/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html” [ READ MORE ]
如何安装Nginx,请到http://blog.s135.com/nginx_php_v6/ 查看详细安装步骤。 0.8的版本ME,默认情况下server{}是写在Nginx.conf中,前几天买了个VPS,L系统,没玩过nginx很头疼,如果你想绑定几个域名,最好把server{}写到一个单独的域名conf中去,在http{ 中 include /opt/nginx/conf/abc.conf; 这样加入进来。 启动nginx: nginx 重启nginx: killall nginx; 或者kill -HUP `cat /opt/nginx/logs/nginx.pid` 查看nginx状态:/opt/nginx/sbin/nginx –t 如何配置404页面:在nginx.conf中http 下fastcgi_intercept_errors on; 开启此项。在server中,error_page 404 = http://www.xxx.com/404.html 写好路径,重启一下OK。 [ READ MORE ]
淡泊以明志,宁静以致远!
探讨网络世界,闲聊人生百态!
岁月无声,静听小桥流水人家,连神都救不了我,唯独只有网络!