Yaf framework url access problems this post was last edited by god_for 2014-04-2316: 50: 23 and later heard about yaf of laruence, I recently tried to build a trial study but encountered some problems during access: in the lnmp environment, the nginx configuration is & nbsp; root & nbsp; wwwwebroot; & nbsp; url access problems of the yaf framework
This post was last edited by god_for at 16:50:23
I have heard of yaf of laruence for a long time, and recently I want to take a trial study.
However, the access encountered some problems:
In the lnmp environment, the nginx configuration is
Root/www/web/root;
If (! -E $ request_filename ){
Rewrite ^/(. *) $/index. php/$1 last;
}
I directly access domain.com/mainwebwithout any questions. I can refer to the internal control index,
However, when I access domain.com/mainweb/index/index, it is indeed 500, and the nginx error log is rewrite or internal redirection cycle while processing "/index. php/index. php/index. php/index. php/index. php/index. php/index. php/index. php/index. php/index. php/index. php/index. php/mainweb/index"
Access to other actions in index control is also a 500 error.
------ Solution --------------------
What is the difference?
Server {
Listen 80;
Server_name www.phpno.com;
Root/home/www/www_phpno_com/admin_wwwroot;
Access_log off;
Error_page 404/404 .html;
Location/404.html {
Root/home/www/www_phpno_com/admin_wwwroot;
}
Location /{
Index index.html index.htm index. php;
If (-e $ request_filename ){
Break;
}
If (! -E $ request_filename ){
Rewrite ^/(. *) $/index. php/$1 last;
Break;
}
}
Location ~ . + \. Php ($
------ Solution --------------------
/){
Root/home/www/www_phpno_com/admin_wwwroot;
Fastcgi_index index. php;
Fastcgi_split_path_info ^ (. + \. php) (. *) $;
Fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name;
Fastcgi_param PATH_INFO $ fastcgi_path_info;
Fastcgi_param PATH_TRANSLATED $ document_root $ fastcgi_path_info;
Fastcgi_pass 127.0.0.1: 9000;
# Fastcgi_index index. php;
# Fastcgi_param SCRIPT_FILENAME/home/www/www_phpno_com/admin_wwwroot/$ fastcgi_script_name;
# Fastcgi_param SCRIPT_FILENAME/usr/local/nginx/html/$ fastcgi_script_name;
Include fastcgi_params;
}
}