Archive for the ‘nginx’ Category

php-fpm报错

[ERROR] fpm_unix_conf_wp(), line 124: please specify user and group other than root, pool ‘default’
安装完php-cgi 不能启动
[ERROR] fpm_unix_conf_wp(), line 124: please specify user and group other than root, pool ‘default’
出现些错误提示,请修改 php-fpm.conf,将注释去掉
Unix user of processes

Read the rest of this entry »

apache rewrite转nginx–对大括号(花括号)的支持

在nginx中这样写规则
rewrite [\w]{5,20} /index.php last; 是无法启动的
解决的办法是加上两个双引号
rewrite “[\w]{5,20}” /index.php last; 这样就OK了
应该可以说是完全兼容apache的语法的,只需要改下RewriteRule为Rewrite,后面的
的这样对应改
[R] -> redirect;
[P] -> last;
[R,L] -> redirect;
[P,L] -> last;
[PT,L] -> last;
nginx rewrite中支持4种类型的转向:
跳转型的
redirect:302跳转到rewrite后的地址
permanent:301永久定向到rewrite后的地址,对搜索引擎更友好
代理型的
last:重新将rewrite后的地址在server标签中执行
break:将rewrite后的地址在当前location标签中执行

Read the rest of this entry »