Test Domain 404 error

In order for a test domain to work, doesn’t there have to be some sort of reference so that a browser can resolve the test domain? I’m running cyberpanel on a self hosted server and get a 404 error every time I try to bring up a test domain. What am I missing?

Here are a few steps you can take to troubleshoot the issue:

  1. Update your hosts file:

To ensure your computer can resolve the test domain, you need to edit the hosts file on your computer.

  • For Windows, the file is located at C:\Windows\System32\drivers\etc\hosts
  • For macOS and Linux, the file is located at /etc/hosts

Open the file using a text editor with administrator privileges and add the following line, replacing your_server_ip with the IP address of your self-hosted server and your_test_domain with the test domain you’re using:

Copy code

your_server_ip your_test_domain

Save the changes and close the file. Now your computer should be able to resolve the test domain to the correct IP address.

  1. Check your CyberPanel configuration:

Make sure that the test domain has been added to CyberPanel, and a website has been created for it. Verify that the document root for the test domain is set correctly and contains the necessary files to serve the website.

  1. Check the webserver configuration:

Ensure that your webserver (usually LiteSpeed or OpenLiteSpeed in the case of CyberPanel) is configured correctly to serve the test domain. Check the virtual host configuration to ensure that the test domain is properly set up, and the document root is pointing to the correct directory.

  1. Check file permissions:

Ensure that the files and directories for your test domain have the correct permissions set, allowing the webserver to read and serve the content.

  1. Check error logs:

If you still encounter issues, check the webserver error logs for any additional information. The logs can be found in the CyberPanel interface or directly on the server in the log directory (usually /usr/local/lsws/logs/ for LiteSpeed/OpenLiteSpeed).