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.
I have found a way to do it. The steps are:
- Go to openlitespeed admin page (:7080), go to Virtual Hosts and add a new vhost.
- 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.
- Add the vhost, then click the view button and go to General tab.
- 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: *
- Click on save and then do a graceful restart using the icon on the top.
- Go to Listeners, click on the view icon from the Default, port 80 line.
- On Virtual Host Mappings, add a new one, choosing * as virtual host type * on Domains.
- Do a graceful restart of LSWS.
- Place the files (html, images, etc.) in the Document Root defined earlier.
ps: if you still get a 404 error page, run this command:
chown -R nobody:nobody /home/default
Have a nice day everyone!
it works, thank you