VPS 重启后,OpenLiteSpeed CyberPanel 上的 Wordpress 出现 404 错误

问题描述 投票:0回答:3

使用 wordpress 重新启动托管

openlitespeed
的 vps 后,我收到
404 错误

所有版本都是使用 Digital Ocean Marketplace 的最新版本(今天刚刚构建)。我的 VPS 运行 CyberPanel(LiteSpeed 的托管控制面板),因此多个网站可以在我的 VPS 中托管。

到目前为止我的努力:

  1. 使用
    sudo service lsws restart
  2. 重新启动 litespeed
  3. 更改
    .htacess
    (在 WordPress
    /home/example.com/public_html
    上)如下所示:
RewriteEngine On
RewriteBase /
RewriteRule ^/index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

但是上述步骤无法解决404错误

现在,即使访问文件

test.txt
(如
example.com/test.txt
)也会给出错误403/禁止(即使使用chmod 777)。

有什么想法吗?

提前谢谢您...

php wordpress .htaccess vps litespeed
3个回答
4
投票

只是想在这里更新结果,以防有人感兴趣。

/home/example.com/public_html 文件夹的权限不正确,这就是 Web 服务器没有读取该文件的权限的原因。修复文件夹权限后,即使服务器重新启动,也不会再出现 404 问题。


0
投票

我通过运行此命令解决了这个问题:

sudo systemctl restart lsws

-1
投票

我想在 cyberpanel 中添加另一个注释,检查包是否空间不足,例如,它给了我一个 4040 包默认值,并修复大小并保存。

© www.soinside.com 2019 - 2024. All rights reserved.