Unable to run website on local network #1143
-
Clear description of your problemI have followed the instructions on the official website on how to run a website on a local network but I'm unable to access my .test website on my local network. Expected behaviorAccessing my .test website via my IP address like so: 10.0.0.23/site.test and being able to see my work site.test website. Current behaviorThe site (via IP address and via .test URL) first returns a privacy error and then when I skip it, I get a 404 Not Found Error as soon as I removed the prefix from listen 80 & 443 and restart valet. valet secure has been run in the directory. Steps to Reproduce
|
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 5 replies
-
Same issue. |
Beta Was this translation helpful? Give feedback.
-
Same here as well. I can access the sites just fine from the local machine. Switching the listen to be 0.0.0.0:80 I can hit the server from another machine on the network. If I add the site name after the IP it won't load. I can set a default site and it works just fine. FWIW I am using valet park. |
Beta Was this translation helpful? Give feedback.
-
The official documentation seems to be incorrect here, following the instructions on the latest version of valet gives a 404 on |
Beta Was this translation helpful? Give feedback.
-
Maybe I don’t understand the difference between a discussion and an issue but to me this seems like it definitely is an issue sense the documented behavior and functionality doesn’t work. |
Beta Was this translation helpful? Give feedback.
-
Agreed, just seems like deflecting and making it appear as though there are fewer issues than there are. While I agree a discussion is warranted it has been recognized by multiple people which to me sounds like a bug. |
Beta Was this translation helpful? Give feedback.
-
It seems it's not a bug, but a feature. With #814 it's not intended to listen from outside of localhost, therefore, it seems it's not possible to share your local site with your local network. As a workaround you might use Ngrok https://laravel.com/docs/8.x/valet#sharing-sites-via-ngrok to tunnel your site to the outside-world which then can also be accessed by devices in your local network. |
Beta Was this translation helpful? Give feedback.
-
As far as I know the only way to solve this is to set a "default" option in ~/.config/valet/config.json like so:
|
Beta Was this translation helpful? Give feedback.
-
But then?? no more access from local network? I installed valet SPECIFICALLY for that feature!! |
Beta Was this translation helpful? Give feedback.
-
The official documentation shows how to use this feature: https://laravel.com/docs/9.x/valet#sharing-sites-on-your-local-network |
Beta Was this translation helpful? Give feedback.
The official documentation shows how to use this feature:
https://laravel.com/docs/9.x/valet#sharing-sites-on-your-local-network