0

There may already be a question similar to this, but I do not find specific to my problem. I was given a public IP for example 10.10.10.15. After setting up DNS, I can normally access through a browser. But I still can access through a public ip.

My question is, how so that others can not access directly the public ip from browser, but the only access to the web address that has been determined?

On the server, I installed ubuntu and general settings for LAMPP.

15
  • 2
    You could set up an Apache virtual host for the IP that gives an error page but I really don't see any advantage to doing that. Jul 23, 2016 at 6:20
  • 2
    @KhalifaEsha: The only people who have such requests think an IP address is something private but anyone that can access your website with the domain name can very easily know its IP address and that's OK. Jul 23, 2016 at 6:25
  • 1
    A more useful solution would be to redirect traffic to the domain. In any case, why would anyone want to use the IP instead of the domain name and why the heck do you care? Jul 23, 2016 at 6:26
  • 1
  • 1
    @Aubrey: for TCP domainname and IPaddr are equivalent; for WWW specifically HTTP/1.1 not. With v4 addrs now scarce, you can have 2 or 5 or 30 or 1000 domainnames map to one addr; the browser connects to the same addr but supplies the domainname in the Host: header (and SNI extension for HTTPS) so the server can provide different content depending on which 'virtual' host you asked fo. This doesn't work if you only tell the browser the addr. Jul 23, 2016 at 10:18

0

You must log in to answer this question.

Browse other questions tagged .