访问变下载 缺这些
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;
}
yaf框架缺这些
server {
listen 81;
server_name localhost;
index index.php;
root /opt/www/highApi;
if (!-e $request_filename) {
rewrite ^/(.*) /index.php/$1 last;
}
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;
}
}

本文详细解析了如何正确配置Nginx以支持YAF框架,包括监听端口、域名设置、路径重写规则及fastcgi参数传递,确保PHP应用能够通过Nginx高效运行。
334

被折叠的 条评论
为什么被折叠?



