我一直在使用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中更改哪些内容才能完成此项工作?
谢谢您提前预约!