You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 4, 2020. It is now read-only.
刚刚建立的tp网站,打开首页是这个样子
查询了一番,说是opendir错误。参考https://www.kancloud.cn/manual/thinkphp5/336757后修改nginx配置文件如下,就增加了fastcgi_param PHP_VALUE这一行。$fastcgi_script_name ~ "^(.+?.php)(/.+)$ ") {
然而,打开网站还是上面的样子。
大牛大神帮我看一下,这里面哪里设置错了。
`
server
{
listen 80;
server_name admin.mydomain.com;
#index index.html index.htm index.php default.html default.htm default.php;
root /var/www/html/admin.mydomain.com/public;
location / {
index index.htm index.html index.php;
if ( -f $request_filename) {
break;
}
#访问路径的文件不存在则重写URL转交给ThinkPHP处理
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
}
}
location ~ [^/].php(/|$) {
set $path_info "";
#定义变量 $real_script_name,用于存放真实地址
set $real_script_name $fastcgi_script_name;
#如果地址与引号内的正则表达式匹配
if (
#将文件地址赋值给变量 $real_script_name
set $real_script_name $1;
#将文件地址后的参数赋值给变量 $path_info
set $path_info $2;
}
#配置fastcgi的一些参数
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
#include fastcgi.conf;
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
`
The text was updated successfully, but these errors were encountered: