VPS侦探论坛

 找回密码
 注册
查看: 1587|回复: 4

lnmp1.9 thinphp6无法运行

[复制链接]
发表于 2023-1-22 01:30:29 | 显示全部楼层 |阅读模式

本帖最后由 yundong1106@gma 于 2023-1-22 01:33 编辑

thinkphp6框架,设置了伪静态和pathinfo,并运行/tools下的remove_open_basedir_restriction.sh去除了防跨站,但依然无法运行。提示:No input file specified.


server
    {
        listen 80;
        listen [::]:80;
        server_name xxx.com ;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /home/wwwroot/xxx.com/public;


        #include rewrite/thinkphp.conf;
        #error_page   404   /404.html;


        # Deny access to PHP files in specific directory
        #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }


        include enable-php8.0-pathinfo.conf;


        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
        }


        location ~ .*\.(js|css)?$
        {
            expires      12h;
        }


        location ~ /.well-known {
            allow all;
        }


        location ~ /\.
        {
            deny all;
        }


        location / {
            return 301 https://$host$request_uri;
        }


        access_log  /home/wwwlogs/xxx.com.log;
    }


server
    {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;
        server_name xxx.com ;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /home/wwwroot/xxx.com/public;


        ssl_certificate /usr/local/nginx/conf/ssl/xxx.com/xxx.com.cer;
        ssl_certificate_key /usr/local/nginx/conf/ssl/xxx.com/xxx.com.key;
        ssl_session_timeout 5m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
        ssl_prefer_server_ciphers on;
        ssl_ciphers "TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-128-GCM-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5";
        ssl_session_cache builtin:1000 shared:SSL:10m;
        # openssl dhparam -out /usr/local/nginx/conf/ssl/dhparam.pem 2048
        ssl_dhparam /usr/local/nginx/conf/ssl/dhparam.pem;


        include rewrite/thinkphp.conf;
        #error_page   404   /404.html;


        # Deny access to PHP files in specific directory
        #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }


        include enable-php8.0-pathinfo.conf;


        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
        }


        location ~ .*\.(js|css)?$
        {
            expires      12h;
        }


        location ~ /.well-known {
            allow all;
        }


        location ~ /\.
        {
            deny all;
        }


        access_log  /home/wwwlogs/xxx.com.log;
    }



美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2023-1-23 09:24:44 | 显示全部楼层


No input file specified.错误一般都是由于 .user.ini 里的目录更改过与fastcgi.conf不一致导致的
建议按防跨目录设置的教程,手动检查一下两处防跨目录设置是否已经删除掉
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2023-1-24 00:28:38 | 显示全部楼层

licess 发表于 2023-1-23 09:24
No input file specified.错误一般都是由于 .user.ini 里的目录更改过与fastcgi.conf不一致导致的
建议按防 ...

我已经运行了remove_open_basedir_restriction.sh,确认.user.ini已被删除,fastcgi.conf中的fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";也已删除,php错误日志提示:open_basedir restriction in effect. File(/home/wwwroot/xxx.com/public/index.php) is not within the allowed path(s): (/www/wwwroot/xxx.com/:/tmp/) in Unknown on line 0
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2023-1-24 00:41:14 | 显示全部楼层



本帖最后由 yundong1106@gma 于 2023-1-24 00:45 编辑

军哥问题解决了,我这是网站搬迁,经过仔细检查原来在public目录下还有一个.user.ini,删除后整个网站正常了。同时请教一个问题,宝塔的.user.ini是在public目录下,为什么LNMP的.user.ini在public目录下不行?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2023-1-26 19:01:12 | 显示全部楼层

yundong1106@gma 发表于 2023-1-24 00:41
军哥问题解决了,我这是网站搬迁,经过仔细检查原来在public目录下还有一个.user.ini,删除后整个网站正常 ...

要看 .user.ini的内容才能确定

军哥运维代购:http://shop63846532.taobao.com/

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-7-27 07:52 , Processed in 0.027314 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表