Mobile app version of vmapp.org
Login or Join
Reiling115

: 404 when accessing website from IP address on VPS 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

@Reiling115

Posted in: #Cpanel #Whm

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:

my.ip.address/~safepath/test.html


Can someone tell me what I am doing wrong here?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Reiling115

1 Comments

Sorted by latest first Latest Oldest Best

 

@Turnbaugh106

To access a cPanel powered website by its IP address:


You must enable mod_userdir.
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.


SOURCE

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:
#
# 102.54.94.97 rhino.acme.com # source server
#
192.168.1.1 exampleA.com
192.168.1.1 exampleB.com
192.168.1.1 exampleC.com

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme