1
barbery 2013-05-10 22:20:33 +08:00
擦 你这样肯定不行啊。。。图片都走php-fpm通道了。。。。
|
2
barbery 2013-05-10 22:24:27 +08:00
location ~ \.php
{ fastcgi_index index.php; fastcgi_pass 127.0.0.1:9000; include /usr/local/Cellar/nginx/conf/fastcgi_params; set $path_info ""; set $real_script_name $fastcgi_script_name; if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") { set $real_script_name $1; set $path_info $2; } fastcgi_param SCRIPT_FILENAME /usr/local/Cellar/nginx/html/$real_script_name; fastcgi_param SCRIPT_NAME $real_script_name; fastcgi_param PATH_INFO $path_info; } 我的nginx.conf 是这样配的。。。这样在本地开发使用php mvc框架,也不会有pathinfo问题。。。具体路径你可能还要改改 |
3
shiny 2013-05-10 22:24:30 +08:00
既然是新手,为什么要编译呢?一键 apt-get/yum 安装好后默认配置都足够清晰,service 启动脚本也给你写好了。
php 的解析应该是 location ~ \.php$ 里的。 |
4
glancesx 2013-05-10 22:51:09 +08:00
location ~ .*\.php?$
{ fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } |