我一直在使用Phalcon在本地開發環境(Vagrant + Virtualbox)中開發項目。它工作得很好,我的開發時間真的減少了。在Plesk 11.5服務器上爲Phalcon配置Nginx
現在我想把這個項目放到一個Plesk 11.5的nginx環境中,我遇到了在Plesk中爲Phalcon配置Nginx的問題。我對Nginx也很陌生。
我有以下Nginx的配置:
server {
listen 80;
server_name localhost.dev;
index index.php index.html index.htm;
set $root_path '/var/www/httpdocs';
root $root_path;
try_files $uri $uri/ @rewrite;
location @rewrite {
rewrite ^/(.*)$ /index.php?_url=/$1;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
root $root_path;
}
location ~ /\.ht {
deny all;
}
}
我去掉了 「服務器{}」,因爲它們沒有被Plesk中nginx的配置允許的。但是,它不起作用。該應用程序的主頁完美顯示,所以Phalcon運行得很好,但路由不起作用:/搜索只是提供了一個404,在我的本地環境中使用該配置工作。
我應該在Plesk中更改哪些內容才能完成此項工作?
謝謝您提前預約!