-1

How to access localhost (xampp) Server from another computer over LAN network , I installed XAMP version: 7.2.10

Also from my local host , I have a php application/page which connects to a page in the internet (hosted outside the local host) and i want to get response from that page through gateway when I call that page by post/get method . how to do this?My Local Network is limited to internet connection

Jerry Abraham
  • 1,039
  • 18
  • 42
  • 1
    Possible duplicate of [Accessing localhost (xampp) from another computer over LAN network - how to?](https://stackoverflow.com/questions/5524116/accessing-localhost-xampp-from-another-computer-over-lan-network-how-to) – Tobias F. Sep 27 '18 at 06:11

1 Answers1

0

Bind your apache to the LAN IP(e.g. 192.168.0.XXX, 10.10.1.XX). Make sure you allow in your firewall inbound connections on port 80 (or whatever the port your apache runs on). Configure your virtual host with Server Alias As long as you don't have restrictions on the LAN you should be able to access the local webserver from the LAN using http://

In regards you your second questions, if you query the external page/resource synchronous you will get the response without problems. If you will expect an asynchronous response, you will need to prepare a bit more and expose your apache port to the internet via a NAT port forward(you will need access to the LAN router) and set your callback to the public IP:port/path

MicPic
  • 184
  • 1
  • 8