1

I have an apache web server running at home. To access it anywhere else than home, I have to type in my home IP address. However when I'm home, I have to use 192.168.1.x to access it and going to my IP will result in a blank page with the title Log in.

How can I make it so I can access my web server by going to my IP even locally?

2 Answers 2

1

Not easily.

From outside your house you've set up a redirect or forwarded port through your router/modem/firewall. You have to talk to the public IP on that modem to actually to your home network.

When you're inside your home network, that public IP address doesn't exist. The 192.168... address is a local IP that was assigned to your server by the router (or manually, by you).

In order to use that same IP, you will have to build rules in your router that instruct it to take requests for your public IP, even internally, and route them to the server. Most common household routers do not support this.

2
0

You have to enable to rule on your home router (if It has this feature) to forward traffic from external port to internal port of the PC with Apache Server.

For example, from external port 80 to port 80 of internal IP 192.168.xx. Better assign static ip to internal Web Server (if It has this feature)

In this way, if you call public ip from inside and from outside of yout network you view the same site.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .