How can I access laragon localhost from another computer in the same network

Viewed 1753

I want to view my Laravel project installed in local from another computer connected to the same network.I use laragon.

I don't want to do this with php artisan serve.

I want to set up a new virtual host.

How can I do it.

I have researched this subject a lot. I made changes to the http-vhosts.conf and hosts files in the results I found. but it didn't work.

The originals of these files are below.

http-vhosts.conf:

<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "${SRVROOT}/docs/dummy-host2.example.com"
ServerName dummy-host2.example.com
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>

hosts:

127.0.0.1      appik.test 
1 Answers

You can't access your localhost from different device. You need to open a port which point to your machine.

There is a simple way, you can use ngrok (https://ngrok.com/) which creates a tunnel and assign you a live link for your http://localhost

you can then access your project something like this

http://ngrok-link.com/your-project/public

Related