I bought a new VPS from Softlayer and I'm having some issues configuring it. I haven't pointed the name servers to it yet.

The problem I'm having is, through WHM, I added a new account and it was setup properly. But when I access it with the IP address I get a 404 error. I uploaded a test.html file through cPanel to home/safepath.

Below is how I access it:


Can someone tell me what I am doing wrong here?

  • Some Apache installs assume a catch-all site by default. All IP address requests go there. If you can access your file via the domain name and not by IP, then your request is going to another web space. Check the 000-default.conf and upload your file there to test. If that works, then change the path in your 000-default.conf if you want your catch-all to default to your site. One warning however. You do this, then any incorrectly addressed request will default to your site. If this is not right, you can add a redirect for IP only requests. – closetnoc Sep 27 '16 at 13:05

To access a cPanel powered website by its IP address:

  1. You must enable mod_userdir.
  2. You must either issue a dedicated IP address or you need to edit the virtual host file and include the IP address. You would normally find this file in /usr/local/apache/conf/httpd.conf.

Alternatively the other and preferred method is to edit the local Windows or Mac OS host file locally, this way you can use a virtual domain even if you don't own it.


The most common and easy method to fix the issue would be to edit your host file within Windows or Mac, this will allow you to access all sites locally, using the domain name as you would externally...

The host file would look something like this:

# Copyright (c) 1993-2009 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
#     rhino.acme.com          # source server
# exampleA.com exampleB.com exampleC.com

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.