-2

i created a small website for testing.. I'm using xampp and via router port forwarding, my website is online. Others can view it without problems. I can view it by localhost/ but the other devices connected to this network can't view it because when they try to connect to it via router public ip address, the D-Link login page is shown.

How can i avoid this? Sorry if this question is a bit hard to get, but i am not english and i'm trying to explain my problem as well as possible

manudicri
  • 3
  • 1

2 Answers2

0

If they are connected to your network they can just navigate to http://your-internal-ip (and you can get your IP from ifconfig or ipconfig).

If they are outside your network then you have to check the port forwarding rule on your router, probably you are not forwarding the port 80 (because it's used by the router web interface) but another port. So if your forwarding rule forwards the port 12345 to your port 80 then they can access your site using http://public-ip-address:12345

Enrico Polesel
  • 193
  • 1
  • 9
  • Users outside my network can connect without problems if they have my router ip address. But users inside my network can't because there is that dlink login page.. it's a bit uncomfortable to give them my internal ip address instead of the router ip address.. – manudicri Jun 13 '18 at 21:43
  • Check your router port forwarding configuration, you may find a way to forward another port (since the 80 is already taken by the web interface) – Enrico Polesel Jun 13 '18 at 21:46
  • internal port: 80~443; external port: 80~80; did it do something wrong? – manudicri Jun 13 '18 at 21:47
0

You normally don't need port forwarding on the same network. Just don't use the router's IP, but you server's IP instead. Eg.

Wrong:

http://192.168.0.1

Right:

http://192.168.0.222
  • It's a bit uncomfortable/inconvenient.. is this the only way? – manudicri Jun 13 '18 at 23:04
  • @DiCri Inconvenient in what way? What do you want to achieve? –  Jun 13 '18 at 23:05
  • i'd like they connect to my website using the router's ip address, not my server's ip. – manudicri Jun 13 '18 at 23:06
  • @DiCri Then you have to set internal LAN forwarding on the router. If your router can do that. Start another question for this with the details of what you can't get over yourself. –  Jun 13 '18 at 23:10