Wordpress with LiteSpeed shows 404 when trying to access it by my new domain

为君一笑 提交于 2019-12-11 23:24:39

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/55227751/wordpress-with-litespeed-shows-404-when-trying-to-access-it-by-my-new-domain

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!