VPS侦探论坛

 找回密码
 注册
查看: 3734|回复: 9

phpmyadmin打开一片空白

[复制链接]
发表于 2021-2-5 00:24:34 | 显示全部楼层 |阅读模式

创建虚拟机,把/home/wwwroot/default绑到了自己的子域名下,可是phpmyadmin打开什么都不显示,一片空白。不知道是哪里出了问题?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2021-2-5 15:47:27 | 显示全部楼层


你是自己修改配置文件绑上的域名还是lnmp vhost add 添加的?
直接ip访问正常吗?php什么版本,phpmyadmin什么版本
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2021-2-5 17:08:23 | 显示全部楼层

licess 发表于 2021-2-5 15:47
你是自己修改配置文件绑上的域名还是lnmp vhost add 添加的?
直接ip访问正常吗?php什么版本,phpmyadmin ...

PHP 7.4.12,用lnmp vhost add 添加的,用IP访问我关了,return 444.phpmyadmin版本是Version 5.0.4。lnmp安装之后是正常的,我建立虚拟主机之后访问就一片空白了。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2021-2-6 12:31:09 | 显示全部楼层




curl -IL 你的这个添加的域名看一下

贴一下默认虚拟主机和这个新添加的域名的配置文件看一下
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2021-2-6 23:46:39 | 显示全部楼层

licess 发表于 2021-2-6 12:31
curl -IL 你的这个添加的域名看一下

贴一下默认虚拟主机和这个新添加的域名的配置文件看一下 ...

这是curl的结果
HTTP/1.1 200 OK
Server: nginx
Date: Sat, 06 Feb 2021 15:36:48 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Vary: Accept-Encoding
X-Powered-By: PHP/7.4.12
Set-Cookie: goto=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/phpmyadmin/
Set-Cookie: back=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/phpmyadmin/
Set-Cookie: pma_lang=en; expires=Mon, 08-Mar-2021 15:36:48 GMT; Max-Age=2592000; path=/phpmyadmin/; HttpOnly
Set-Cookie: phpMyAdmin=j58rjrn1mdr47tnk22qdesddoa; path=/phpmyadmin/; HttpOnly
X-ob_mode: 1
X-Frame-Options: DENY
Referrer-Policy: no-referrer
Content-Security-Policy: default-src 'self' ;script-src 'self' 'unsafe-inline' 'unsafe-eval' ;style-src 'self' 'unsafe-inline' ;img-src 'self' data:  *.tile.openstreetmap.org;object-src 'none';
X-Content-Security-Policy: default-src 'self' ;options inline-script eval-script;referrer no-referrer;img-src 'self' data:  *.tile.openstreetmap.org;object-src 'none';
X-WebKit-CSP: default-src 'self' ;script-src 'self'  'unsafe-inline' 'unsafe-eval';referrer no-referrer;style-src 'self' 'unsafe-inline' ;img-src 'self' data:  *.tile.openstreetmap.org;object-src 'none';
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Permitted-Cross-Domain-Policies: none
X-Robots-Tag: noindex, nofollow
Expires: Sat, 06 Feb 2021 15:36:48 +0000
Cache-Control: no-store, no-cache, must-revalidate,  pre-check=0, post-check=0, max-age=0
Pragma: no-cache
Last-Modified: Sat, 06 Feb 2021 15:36:48 +0000
Vary: Accept-Encoding

默认配置
user  www www;

worker_processes auto;
worker_cpu_affinity auto;

error_log  /home/wwwlogs/nginx_error.log  crit;

pid        /usr/local/nginx/logs/nginx.pid;

#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200;

events
    {
        use epoll;
        worker_connections 51200;
        multi_accept off;
        accept_mutex off;
    }

http
    {
        include       mime.types;
        default_type  application/octet-stream;

        server_names_hash_bucket_size 128;
        client_header_buffer_size 32k;
        large_client_header_buffers 4 32k;
        client_max_body_size 50m;

        sendfile on;
        sendfile_max_chunk 512k;
        tcp_nopush on;

        keepalive_timeout 60;

        tcp_nodelay on;

        fastcgi_connect_timeout 300;
        fastcgi_send_timeout 300;
        fastcgi_read_timeout 300;
        fastcgi_buffer_size 64k;
        fastcgi_buffers 4 64k;
        fastcgi_busy_buffers_size 128k;
        fastcgi_temp_file_write_size 256k;

        gzip on;
        gzip_min_length  1k;
        gzip_buffers     4 16k;
        gzip_http_version 1.1;
        gzip_comp_level 2;
        gzip_types     text/plain application/javascript application/x-javascript text/javascript text/css application/xml application/xml+rss;
        gzip_vary on;
        gzip_proxied   expired no-cache no-store private auth;
        gzip_disable   "MSIE [1-6]\.";

        #limit_conn_zone $binary_remote_addr zone=perip:10m;
        ##If enable limit_conn_zone,add "limit_conn perip 10;" to server section.

        server_tokens off;
        access_log off;

server
    {
        #listen 80 default_server reuseport;
        ##listen [::]:80 default_server ipv6only=on;
        #server_name _;
        #return 301 https://$host$request_uri;
        #index index.html index.htm index.php;
        #root  /home/wwwroot/default;

        listen 80 default_server;
        server_name _;
        return 444;#这三段代码是通过IP访问直接丢弃,上面是默认代码

        #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-php.conf;

        location /nginx_status
        {
            stub_status on;
            access_log   off;
        }

        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/access.log;
    }
include vhost/*.conf;
}

新建主机配置
server
    {
        listen 80;
        #listen [::]:80;
        server_name 我的域名 ;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /home/wwwroot/default;

        include rewrite/other.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-php-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 off;
    }

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

 楼主| 发表于 2021-2-6 23:52:27 | 显示全部楼层

LNMP一键安装包安装成功界面是能打开的,但图片资源无法加载,探针和phpinfo也都正常,就phpmyadmin打不开,也没有报错信息。
发表于 2021-2-7 08:48:47 | 显示全部楼层

谦谦君子 发表于 2021-2-6 23:46
这是curl的结果
默认配置

按配置文件看,你开启了pathinfo,phpmyadmin不能开启pathinfo
其他没问题
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2021-2-7 17:55:03 | 显示全部楼层

我把pathinfo关了也打不开。
之后我用ie浏览器成功打开了。最后发现问题在哪了。Microsoft edge打开这个站点的时候css之类的加载不出来。只能显示纯文本信息。
phpmyadmin的登陆界面全是样式,所以打开全是空白。
这种是网站没设置好吗?浏览器浏览其他站点也没有问题。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2021-2-7 19:40:10 | 显示全部楼层

谦谦君子 发表于 2021-2-7 17:55
我把pathinfo关了也打不开。
之后我用ie浏览器成功打开了。最后发现问题在哪了。Microsoft edge打开这个站 ...

方便的话短消息phpmyadmin看一下
直接访问css文件报错吗?

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

 楼主| 发表于 2021-2-8 00:36:27 | 显示全部楼层



找到原因了!
我的屏蔽广告插件把它拦截了,导致网站不能正常显示。
明明第一次在lnmp安装成功的时候都很正常。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-21 04:26 , Processed in 0.033093 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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