我的配置:
server {
listen 80;
server_name www.xxx.com xxx.com;
# server_name_in_redirect off;
root /alidata/www/default/yooao/frontend/web;
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;
}
location / {
index index.php ;
root /alidata/www/default/yooao/frontend/web;
}
location ~ ^/backend$ {
index index.php ;
root /alidata/www/default/yooao/backend/web;
}
}
现在是前台可以进去,后台却不对,我用的是yii2框架。之前没加
`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;
}`
时进前台首页会变成下载页面。现在我想匹配url进后台不知道该怎么做了,现在进后台www.xxx.com/backend显示404,新手求指教
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
业精于勤,荒于嬉;行成于思,毁于随。