Mobile app version of vmapp.org
Login or Join
Eichhorn148

: Set IP address to point to certain domain I have a Linux VPS, DirectAdmin as web panel and already set a domain to it. everything is OK and I can see my website in my browser using domain

@Eichhorn148

Posted in: #IpAddress #MultipleDomains

I have a Linux VPS, DirectAdmin as web panel and already set a domain to it. everything is OK and I can see my website in my browser using domain name.

Now I need to have access to my site using its IP address. something like 86.57.88.29, but when I try to load my site in a browser using its IP I get below message and I have to post-fix my IP with /~admin (http://86.57.88.29/~admin) to get it work.


This IP is being shared among many domains.
To view the domain you are looking for, simply enter the domain name in the location bar of your web browser.


So how can I configure my IP to point to my public_html folder without and ~admin like
phrase?

Thanks.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Eichhorn148

1 Comments

Sorted by latest first Latest Oldest Best

 

@Kevin317

A domain always points only to an IP address, nothing more, so there is nothing you can configure.

What you want to do, is to configure your web server. As you have already noticed, it is set up to serve multiple domains from one IP. In Apache this configuration is called NameVirtualHost, other web servers will handle it similarly. What happens is, that the webserver listens at a given IP, and when a request comes in, it compares the requested domain with the defined virtual hosts.

Your workaround can be to define a virtual host based on the IP-address and serve content from it. But it may be a bad idea and is also the reason, why you are seeing the quoted message. The whole name based virtual hosts only work with the HTTP protocol 1.1, older clients with HTTP 1.0 are not supported. It is therefore common practice not to serve content from a pure IP request, when the IP is also being used for name based virtual hosts. Otherwise an old client, requesting one of the domains might be served content that was meant to be delivered when requesting the IP.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme