How to access localhost (xampp) from another computer

I installed XAMPP on my computer. I want to access my local host when I enter my IP address on another computer. But when I type in my ip-address, it takes me to the modem settings page. Please help me (I am using the ip address from whatismyip.com)

+6
source share
3 answers

If you are trying to access local XAMPP from another computer on the local network, you will need to use the local IP address. Probably something like 192.168.xx (in the Windows window you can type "ipconfig" in the command line to get this IP address)

If you are trying to access from outside the local network, you need to transfer port 80 through the router to the computer on which your XAMPP is running.

+4
source

You need to open port 80 (or any port that you use for Apache) on your firewall. This is pretty well described here http://portforward.com/ for most routers.

I would also recommend that you get something like DynDNS , which makes dynamic IPs less hectic.

0
source

First you need to configure your computer to get a static IP address from your router. Instructions on how to do this can be found here: here

For example, let's say you have chosen iPaddress. After the above step is completed, you can access the website on your local computer by going to "http: // localhost" and "http: // theipaddress", since your computer will always have this IP address on your network.

If you are viewing your IP address (for example, "http://www.ip-adress.com/"), the IP address you see is actually the IP address of your router. When your friend accesses your site, you will give him that IP address. However, you need to tell the router that when it receives a request for a web page, send this request to your server. This is done by port forwarding.

Two examples of how to do this can be found here and here, although the exact screens that you see will vary depending on the manufacturer of your router (Google for exact instructions if necessary).

For the Linksys router I have, I enter "http://192.168.1.1/", enter your username / password, the tab "Applications and games"> "Port range forward". Enter the application name (whatever you want to name), start port (80), end port (80), protocol (TCP), IP address (using the above example, you must enter 192.168.1.102, which is a static IP you have assigned your server address), and be sure to check to enable forwarding. Reboot the router and the changes take effect.

Having done all this, you can now access your web page by going to the web browser on your computer and entering "http://IP.address.of.your.computer" (the same one that you see when you come here).

As mentioned earlier, the IP address assigned by your ISP will ultimately change whether you go offline or not.

Hope this helps.

-4
source

Source: https://habr.com/ru/post/917074/


All Articles