I need some help on how to access my site running on my pc from another device in case the other device belongs: (1) to the same LAN and (2) outside LAN.
I am using XAMPP Apache server. On my pc I simply browse to page laravel.site and fully access my site.
At cmd I ran c:\xampp\htdocs\laravel\php artisan serve --host 192.168.1.101 --port 5000, (where 192.168.1.101 is my local ip address). In this case, when browsing to 192.168.1.101:5000 from other local pc I can see my site's first page. But when clicking on site links I get a dns error. I can only indirectly access other site routes with 192.168.1.101:5000/[route]
For your info, my C:\Windows\System32\drivers\etc\hosts file line regarding laravel is:
and my C:\xampp\apache\conf\extra\httpd-vhosts excerpt for laravel is the following:
# VirtualHost for LARAVEL.DEV <VirtualHost laravel.site:80> DocumentRoot "C:\xampp\htdocs\laravel\public" ServerAdmin laravel.site <Directory "C:\xampp\htdocs\laravel"> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> </VirtualHost> ##</VirtualHost>