I get index.html 404 Error in OpenLiteSpeed fresh install

#1
Hello,

I try to migrate from shared hosting to the VPS for the first time and I got stuck at this:

I installed Alma Linux 8 on a VPS, then I update it, then I installed CyberPanel with OpenLiteSpeed and now I’ve created a fresh site. In public_html I only have the basic index.html file.

When I write the server’s IP in the browser, I get the 404 error from OpenLiteSpeed. I even tried to open it as an IP/index.html but still I got the 404 error.

I checked the permisions for both the public html (drwxr-x—) and index.html (-rw-rw-r–) and they are just like in the shared hosting with cPanel that I want migrate to the VPS.

As I said, this is a fresh install and didn’t change anything and simply I don’t understand why I can’t see the index.html file, and I get a 404 Error.

What am I doing wrong? I spent all day on this and can't figure it out.

Help me, thank you!
 
#3
Hello @Cold-Egg

I found out what was the problem: I had to map the vHost Config of the new site to domain (IP) in Listener.

I used the OpenLiteSpeed interface in Chrome, then I went to “Listeners” I clicked on “SSL” and in “Virtual Host Mappings” and added a new virtual host called “Example” and in the domain field I put my server’s IP address.

This will load the OpenLiteSpeed welcome message. If you want to open your index.html when you put your server’s IP in browser, you need to go also to OpenLiteSpeed / Virtual Hosts click on “Example” go to the “General” tab and in the “Document Root” add the path to your public_html For example: /home/domainname.com/public_html Don’t forget to replace “domainname.com” with your domain name.

I said to write this here, because a lot of people had the problem with 404 Error of OpenLiteSpeed after installing Cyberpanel and adding a website and entering server’s IP in browser, and nobody came anywhere with a solution.

It won't really help you with anything to map the IP, and I lost a day trying to find this... I should just configure my nameservers, switched them at my domain registrar and I probably I would have been just fine... but when you don't have anything to do, you just lose time... like me... but I least I know a little bit more now :)

I hope it will help others this...

Thank you,

Alex

PS: @Cold-Egg can you please move my topic to "Linux Support: RHEL, CentOS, SUSE etc" because it's about Alma Linux 8, Cyberpanel and OpenLiteSpeed and I think that's its place. I was clueless when I post it in this section :giggle:
 

Cold-Egg

Administrator
#4
Right, because CyberPanel is a control panel, it will not map IP to any newly created domain/site, need to visit the site by domain. Glad to know that you have found the solution. :)
 
Top