我想在本地機器(Win8x64)上設置Zurmo CRM。安裝完所有要求後,我想開始實際安裝。問題在於,似乎路徑沒有從NGinx正確傳遞到FastCGI PHP。這裏是我的Nginx的服務配置:如何正確配置Nginx的PHP(Yii框架和Zurmo)
server {
listen 80;
server_name zurmo.local;
root html/zurmo.local;
set $index "index.php";
charset utf-8;
location/{
index index.html $index;
try_files $uri $uri/ /$index?$args;
}
location ~ ^/(protected|framework|themes/\w+/views) {
deny all;
}
location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
try_files $uri =404;
}
location ~ \.php {
fastcgi_split_path_info ^(.+\.php)(.*)$;
set $fsn /$index;
if (-f $document_root$fastcgi_script_name){
set $fsn $fastcgi_script_name;
}
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fsn;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fsn;
}
location ~ /\.ht {
deny all;
}
}
其結果是,當我撥打電話到zurmo.local(被添加到hosts文件)我得到「此網頁有重定向循環」使用URI看起來這樣http://zurmo.local/app/app/ [...] /app/app/index.php
如果代替$document_root$fsn
和我評論的PATH_INFO
和PATH_TRANSLATED
比我得到No input file specified.
一個URI看起來像http://zurmo.local/app/app/index.php
進一步尋找到它,當我加入access_log html/zurmo.local/logs/access.log;
Nginx的error.log
讓我看到以下內容:[timestamp] [emerg] 4064#3660: CreateFile() "[path to stack]\nginx/html/zurmo.local/logs/access.log" failed (3: The system cannot find the path specified)
。正如你所看到的,目錄分隔符不一致。
最後一個註釋,我的Nginx主目錄位於nginx/html
這實際上是一個連接到../home
這純粹是爲了保持我的文件結構適合我的日常工作。
如何正確配置Nginx才能繼續(使用Zurmo安裝)?
似乎我在這裏得到重定向:'/ app/app/index.php',具有相同的結果'沒有指定輸入文件。'問題可能來自其他地方嗎? – jimasun