1.官方给予的配置:https://docs.phalconphp.com/zh/latest/reference/nginx.html
2.以下是在原来配置的基础上的配置
server {
listen 3500;
server_name 208.43.14.234;
index index.php index.html index.htm;
root /www/web/test/phalconphp/restful;
try_files $uri $uri/ @rewrite;
location @rewrite {
rewrite ^(.*)$ /index.php?_url=$1;
}
location ~ \.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index /index.php;
include fcgi.conf;
}
location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
root /www/web/test/phalconphp/restful/public;
}
location ~ /\.ht {
deny all;
}
}