V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Bwoywan
V2EX  ›  站长

搭建 Typecho 遇到 几乎所有 css 404

  •  
  •   Bwoywan · 2019-08-31 23:20:03 +08:00 · 3743 次点击
    这是一个创建于 1690 天前的主题,其中的信息可能已经有所发展或是发生改变。

    如题描述,文章、后台访问正常,但是几乎所有样式表 404,已加伪静态(开关伪静态没有改变)。

    控制台

    服务器是 lnmp 一键安装包配置的。

    虚拟主机配置文件

    server {
            listen 443 ssl;
            server_name mysite.com;
            root /home/wwwroot/type/;
            index index.php;
            include enable-php-pathinfo.conf;
            include enable-php.conf;
            #try_files $uri =500;
            ssl_certificate          /path/;
    
            ssl_certificate_key      /path/;
    
            ssl_protocols            TLSv1 TLSv1.1 TLSv1.2;
    
            ssl_ciphers              HIGH:!aNULL:!MD5;
            #if (!-e $request_filename) {
    
             #   rewrite ^(.*)$ /index.php$1 last;
    
            #}
            #location ~ .*\.php(\/.*)*$ {
            #       include enable-php.conf;
            #       include enable-php-pathinfo.conf;
            #}
            location / {
    
            index index.html index.php;
    
            if (-f $request_filename/index.html) {
    
            rewrite (.*) $1/index.html break;
    
            }
    
            if (-f $request_filename/index.php) {
    
            rewrite (.*) $1/index.php;
    
            }
    
            if (!-f $request_filename) {
    
            rewrite (.*) /index.php;
    
            }
    
    }
            access_log /home/wwwroot/type-access.log;
    }
    server {
            listen 80;
            server_name mtsite.com;
            root /home/wwwroot/type/;
            index index.php;
            include enable-php-pathinfo.conf;
            include enable-php-pathinfo.conf;
            add_header Strict-Transport-Security "max-age=31536000; includeSubDomains;preload" always;
    
    
    
            #force rewrite_to_https
    
            return      301 https://$server_name$request_uri;
            }
          
    

    nginx-error 没有报错信息,

    有老哥能指点一下吗?万分感谢。

    还是给下站点吧;click

    4 条回复    2019-09-15 22:03:52 +08:00
    Tink
        1
    Tink  
       2019-09-01 00:01:45 +08:00 via iPhone
    用默认主题也会这样吗
    Bwoywan
        2
    Bwoywan  
    OP
       2019-09-01 00:52:39 +08:00 via Android
    @Tink 不会,谢谢回复,问题解决了,下载下来的文件不完整(
    vpsor
        3
    vpsor  
       2019-09-14 13:05:15 +08:00
    检查 404 有以下几个思路解决:

    1. 文件是否缺失
    2. .htaccess 规则是否不正确( Apache 服务器)
    3. 大小写路径问题(可能包含中文路径问题)
    Bwoywan
        4
    Bwoywan  
    OP
       2019-09-15 22:03:52 +08:00
    @vpsor #3
    感谢回复,目前原因就是下错包了,CSS 不见了。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   945 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 21:18 · PVG 05:18 · LAX 14:18 · JFK 17:18
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.