VPS侦探论坛

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

求助,部署typecho出现404

[复制链接]
发表于 2016-2-16 10:17:40 | 显示全部楼层 |阅读模式

我用的是LNMP1.3版本,部署typecho之后只能访问首页,登录或者点文章都是404.下面是我的站点配置,帮忙看看问题出在哪里,谢谢!

https://ta0.wang

  1. server
  2.         {
  3.                   listen      80;
  4.                   server_name www.ta0.wang ta0.wang;
  5.                   rewrite ^/(.*)$ https://$host/$1 redirect;

  6.         }

  7. server
  8.     {
  9.                 listen 443;
  10.         #listen [::]:80;
  11.         server_name www.ta0.wang ta0.wang;
  12.                 ssl on;
  13.                 ssl_certificate /etc/SSL/1_ta0.wang_bundle.crt;
  14.                 ssl_certificate_key /etc/SSL/2_ta0.wang.key;
  15.         index index.html index.htm index.php default.html default.htm default.php;
  16.         root  /home/wwwroot/www.ta0.wang;
  17.                 include enable-php.conf;

  18.                 include typecho.conf;
  19.         #error_page   404   /404.html;
  20.         location ~ [^/]\.php(/|$)
  21.         {
  22.             # comment try_files $uri =404; to enable pathinfo
  23.             # try_files $uri =404;
  24.             fastcgi_pass  unix:/tmp/php-cgi.sock;
  25.             fastcgi_index index.php;
  26.             include fastcgi.conf;
  27.             include pathinfo.conf;
  28.         }
  29.                
  30.         location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  31.         {
  32.             expires      30d;
  33.         }

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


  38.         access_log off;
  39.     }
复制代码
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2016-2-16 13:17:56 | 显示全部楼层


1.3跟1.2不一样吗,我按照论坛里搜出来的帖子做也不行啊
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2016-2-16 15:02:31 | 显示全部楼层

回到1.2了,在板瓦工测试可以用。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2016-2-16 15:15:53 | 显示全部楼层

回复 2# 的帖子




include enable-php.conf;

                include typecho.conf;
        #error_page   404   /404.html;
        location ~ [^/]\.php(/|$)
        {
            # comment try_files $uri =404; to enable pathinfo
            # try_files $uri =404;
            fastcgi_pass  unix:/tmp/php-cgi.sock;
            fastcgi_index index.php;
            include fastcgi.conf;
            include pathinfo.conf;
        }

你这里都重复了,1.3上启用php部分直接是include enable-php.conf
启用php和pathinfo是include enable-php-pathinfo.conf
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2016-2-16 23:22:48 | 显示全部楼层

谢军哥指点!!!!!!

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

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

本版积分规则

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

GMT+8, 2024-9-28 21:21 , Processed in 0.027033 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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