Default server webpage points to 404 page

Hello!
Is there a way to define and edit the default webpage displayed when you access the cyberpanel server ip? When I access a website defined in the admin panel, it shows fine, but when I access the IP of the server, it shows a 404 page. I would like to be able to put a small static html site to be displayed on the server ip.
Thank you!

Comments

  • I have found a way to do it. The steps are:
    1. Go to openlitespeed admin page (:7080), go to Virtual Hosts and add a new vhost.
    2. Fill in these details:
    Virtual Host Name: *
    Virtual Host Root: /home/default (or any folder you want)
    Config File: $SERVER_ROOT/conf/vhosts/defaultvh/vhconf.conf
    Folow Symbolik Link, Enable Scripts, Restrained - all set to yes.
    3. Add the vhost, then click the view button and go to General tab.
    4. Click on the pencil icon to edit the first group, and set the following:
    Document Root: /home/default (or the folder you defined on the previous step)
    Domain Name: *
    5. Click on save and then do a graceful restart using the icon on the top.
    6. Go to Listeners, click on the view icon from the Default, port 80 line.
    7. On Virtual Host Mappings, add a new one, choosing * as virtual host type * on Domains.
    8. Do a graceful restart of LSWS.
    9. Place the files (html, images, etc.) in the Document Root defined earlier.
    10. Enjoy!

    ps: if you still get a 404 error page, run this command:
    chown -R nobody:nobody /home/default

    Have a nice day everyone!
Sign In or Register to comment.
Support CyberPanel CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion