尝试通过新域访问时,带有LiteSpeed的Wordpress显示404 [英] Wordpress with LiteSpeed shows 404 when trying to access it by my new domain

查看:398
本文介绍了尝试通过新域访问时,带有LiteSpeed的Wordpress显示404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Digital Ocean小滴中创建了具有开放LiteSpeed缓存的wordpress实例,如果我在设置"/常规站点"和Wordpress URL中配置了IP,它可以正常工作,但是当我添加dns名称时,便会弹出404到处.屏幕显示: 404 未找到 在此服务器上找不到请求的资源! 自豪地由LiteSpeed Web服务器提供支持 请注意,LiteSpeed Technologies Inc.不是网络托管公司,因此无法控制在此网站上找到的内容.

我认为问题出在这个LiteSpeed上,它似乎不够聪明,无法确定是否配置了新域?不幸的是,重新启动LiteSpeed Web服务器没有帮助...

有什么想法吗?

解决方案

您必须访问OpenLiteSpeed控制台,您可以在服务器根目录的主目录中的.litespeed_password文件中找到该控制台的密码.

您还需要允许您的IP地址能够连接到控制台,只需执行ufw allow from <your_home_ip_address>即可完成此操作.

也在此处记录: https://docs. litespeedtech.com/Cloud/wordpress/#web-server-control-panel-access

当您在控制台中时,可以转到监听器",在这里您将找到两个监听器,一个名为"Default",一个名为"Defaultssl".

在每个侦听器上,您都必须修改虚拟主机映射"以在域"下使用您的域-重新启动OpenLiteSpeed之后,当您通过域访问该站点时,它不应再返回404.

I have created an instance of wordpress with open LiteSpeed cache in Digital Ocean droplets, it works fine if I have the IP configured in the Settings/General Site and Wordpress URL, but when I add my dns name, starts popping up 404 everywhere. The screen reads: 404 Not Found The resource requested could not be found on this server! Proudly powered by LiteSpeed Web Server Please be advised that LiteSpeed Technologies Inc. is not a web hosting company and, as such, has no control over content found on this site.

I believe the problem is in this LiteSpeed, which don't seem to be clever enough to figure that there is a new domain configured? Unfortunately restarting the LiteSpeed web server did not help...

Any ideas?

解决方案

You have to access the OpenLiteSpeed Console, you can find the password for the console in the .litespeed_password file in the root's home directory on the server.

You also need to allow your IP address to be able to connect to the console, you can do this simply by executing ufw allow from <your_home_ip_address>.

Also documented here: https://docs.litespeedtech.com/Cloud/wordpress/#web-server-control-panel-access

When you're within the Console you can go to "Listeners", here you'll find two listeners, one named "Default" and one named "Defaultssl".

On each listener you have to modify the "Virtual Host Mappings" to use your domain under "Domains" - after this restart OpenLiteSpeed, and it should no longer return a 404 when you access the site via your domain.

这篇关于尝试通过新域访问时,带有LiteSpeed的Wordpress显示404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆