Access project via IP / LocalHost

  • | 234 points


    I have found several topics regarding my issue but have been unable to resolve it.

    I have auto virtual hosts enabled creating a http://myproject.test link which is working fine. But I wish to be able to access the page via http://localhost/myproject. Unfortunately this is giving me a 404 page.

    Reason I wish to be able to resolve this is, I would like to test from my mobile device without having to use ngrok sharing.

    How would I be able to access my project via the localhost address?



  • | 668 points

    Yes, you can access your development PC using a mobile device on the same network.

    You need the IP address of your development PC, open terminal and type IPCONFIG. Make a note of the IPv4 address e.g. IPv4 Address. . . . . . . . . . . :

    Start Laragon, and click Start All. Wait for Apache (or NGINX) to start.

    Click Web. The web page will open with a Laragon message. Still, on your dev PC in the address bar type in the IP address you noted earlier, e.g. hit enter and you will see the same Laragon screen. Finally, try that IP address on your mobile.


    To access subfolders, they must contain a file named index.php or index.html. You navigate to the same IP address as before, with the directory name. e.g.


    To see the Laragon page on your mobile, you must be on the same network as your PC, it doesn't matter if the PC is wired and the mobile phone is using WiFi, as long as they are on the same internal network. It will not work if your mobile is on a mobile network (3g/4g). When you first launch Laragon you need to allow Apache through your windows firewall too.

  • | 234 points

    Hi @Pen-y-Fan,

    Thanks for your comment, so actually the method you mention is what I expected to work. Unfortunately I'm only able to access the Laragon welcome page. All the project pages are not reachable other than by using the pretty url. Neither when I enter the full address including the index.php file.

    I didn't face this issue using XAMPP, so my thought is, it has something to do with Laragon.



Log in to reply

Looks like your connection to Laragon was lost, please wait while we try to reconnect.