Kunal Chopra
Kunal Chopra

Reputation: 239

I can't access my site by IP address?

I have set up some domain names that point to my house's IP address and I can access my site using those domains, but if I type in http://99.227.127.113 in the address bar, my site doesn't load, even though the domains are linked to this address. How can I access my site using the IP? I run a Windows-based Apache 2.4.9 with WAMP, currently using virtual hosts.

Upvotes: 0

Views: 3474

Answers (2)

Kevin Keane
Kevin Keane

Reputation: 1658

You are probably using name-based virtual hosting. Those virtual hosts require that your Web browser sends the DNS name in the request (in the Host header). If you use only the IP address, the browser will send that, and Apache won't know what to do with it.

You can change one of these sites (for each IP address) to be the default virtual hosting site.

Rather than retype what's already available, look at the examples on the Apache Web site: http://httpd.apache.org/docs/2.4/vhosts/examples.html

Upvotes: 2

ShakeSpear
ShakeSpear

Reputation: 27

It is most likely apache mis configuration. Try reinstalling it. If that does not work, if you are hosting this from your house, or your own network, make sure the port is forwarded to 80-80 and that it is going to your computer.

Upvotes: 0

Related Questions