我把博客转移到了 Linux 下边, 由于 WP 使用了 pathinfo , 而 cgi.fix_pathinfo 设置为 0, 所以修改网站的配置文件变成这样:
location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini # With php5-cgi alone: fastcgi_pass 127.0.0.1:9000; # With php5-fpm: #fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } location ~ \.php/ { fastcgi_split_path_info ^(.+\.php)(/.+)$; # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini # With php5-cgi alone: fastcgi_pass 127.0.0.1:9000; # With php5-fpm: #fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; }
就可以解决使用pathinfo出现404或者”Access denied.”的错误。
欢迎使用xxfpm维护多个php进程 :smile:
http://xiaoxia.org/2011/02/01/xxfpm-wrote-a-fastcgi-process-manager/
orz
好多文件都不存在了
如?