myexcite
V2EX  ›  WordPress

使用腾讯云搭建的 WordPress 博客经常出现 nginx404 页面

  •  
  •   myexcite · Apr 14, 2018 · 4002 views
    This topic created in 2980 days ago, the information mentioned may be changed or developed.

    在 3 月将近月底的时候拿到了备案号,开始在腾讯云搭建博客 http://www.imzimo.com ,本人不懂技术,搭建的过程完全按照腾讯的官方教程 https://cloud.tencent.com/document/product/213/8044 后来发现固定链接无法设置,在腾讯云的云市场里面发现有“伪静态设置”服务,便花 30 元买了一次,伪静态设置成功后,后来发现在 WordPress 后台访问时经常出现“ File not found ”的提示,原来是地址栏少了 wp-admin 部分,手动加上“ wp-admin/”就正常了,现在的情况是:后台访问不再出错,但是访问博客的时候经常出现 nginx404 页面。

    本人不懂技术,望各位大神指教,有用的和貌似有用的一定手动点赞。

    5 replies    2018-05-01 11:36:12 +08:00
    alvinbone88
        1
    alvinbone88  
       Apr 14, 2018   ❤️ 1
    打开 NGINX 的配置文件(按教程应该在 /etc/nginx/conf.d/default.conf ),找到 location / ,然后在括号{}里面加一行
    try_files $uri $uri/ /index.php?$args;
    xzc0001
        2
    xzc0001  
       Apr 14, 2018   ❤️ 1
    xzc0001
        3
    xzc0001  
       Apr 14, 2018   ❤️ 1
    night98
        4
    night98  
       Apr 14, 2018 via Android   ❤️ 1
    宝塔面板或 lnmp 一键脚本了解一下
    myexcite
        5
    myexcite  
    OP
       May 1, 2018
    @night98 感谢,使用宝塔面板重建了网站,完美解决
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   929 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 21:10 · PVG 05:10 · LAX 14:10 · JFK 17:10
    ♥ Do have faith in what you're doing.