Access Laravel website with valet in local network - laravel

I want to access the website using another device in the same network.
I don’t want to use valet share As it share it publicly.
I have followed the https://laravel.com/docs/9.x/valet#sharing-sites-on-your-local-network and changed the valet.conf with removing the 127.0.0.1 from the line
Still can’t access the my website with 192.168.1.10/application.test (example ip)
What I get is (404 - Not Found) Which I think is from nginx
Please help

Related

How to share subdomain site using laravel valet?

I'm developing site with subdomain. I am using laravel valet as well So, It's currently look like https://app.portal.test/ in my local environment. I want to share this site using laravel valet sharing site option sharing-sites-via-ngrok. But it's not working. So I guess I want to do something different for sharing with subdomain. Anyone have any idea how to do for valet share for subdomain?
TLDR: You can't
You cant share https://app.portal.test (.test), thats for local only, it doesn't resolve on internet.
If you have public ip (whatsmyip.com) and that ip opens your localhost, then you can create a virtual host that point to that IP but you still need a real domain not test.
Using ngork is best option you have, You can also get a cheap $3 vps and point your domain to it.

Getting laravel app pretty url on Nginx (homestead) working

trying to lunch a laravel site on a homestead setup with a pretty url: moziz.app. my host file : 192.168.10.10 moziz.app
all i get back is Your connection is not private with this:
The problem is that you're accessing your local host with HTTPS. This might be caused by Chrome enforcing HTTP Strict Transport Security (HSTS) for all .app domains (Google owns the .app TLD, so they can enforce this).
The easiest solution is to switch your domain to moziz.test (update your hosts file and Homestead.yaml), and then use http:// instead of https://.
After changing the sites property in Homestead.yaml you might also need to run vagrant reload --provision.

GhostLab website On Mobile Fails To Ping Other Locally Hosted Site Via AJAX

Testing out Ghostlab on mobile presented an issue when the locally hosted page attempts to ping another locally hosted page via AJAX. Normally, GhostLab will rewrite the URL for you, but since it's an AJAX request I'm assuming it's not rewriting it because it's a dynamically generated URL.
Works fine on virtual machines and host machine with modified HOST file. Fails to load AJAX. The proxy server settings are very limited on GhostLab. Has anyone come across this issue and solved it?
The solution is to run another proxy server because you can't really modify the HOST file on iPhones or Androids without a huge headache.
I ended up using Charles Proxy. I remapped the locally hosted URL to which it was making the AJAX call to my local machine and it fixed everything. Here are the instructions:
1) Open Charles
2) (Menu)Tools/Map Remote...
Add the url you are local hosting to remap any traffic going through Charles Proxy to go to your machine See image example:
Do the same to any other subdomains or domains that are locally hosted on your machine and remap them too.
3) On your mobile device, open settings and select your local Wifi Network.
4) Change the proxy to your machine's IP address and relevant PORT.
5) Attempt to access the website and Grant permission via Charles.
This should fix it all.

Can't access web, only server default page is showing

I have just moved to a VPS server. I have uploaded my files to httpdcos/ but then when I access my website, it still shows the server default page.
How do I fix this?
My website is at 216.87.168.104 - the server runs Parallels Plesk.
It happens because apache doesn't serves your website on IP to which your domain name resolved.
Check IP of your domain:
nslookup <yourdomain.tld>
Check output of apachectl -S - make sure that domain name is served on resolved IP address

Magento site not getting launched from outside my LAN

Secure and Unsecure base url has been set to http://xx.xx.xx.xx/magento/. Where xx.xx.xx.xx is my LAN IP. So ecommerce magento site works fine in my local machine with above mentioned URL.
and my LAN IP is NAT with global IP yy.yy.yy.yy.
When I launch my magento ecommerce site with global ip( http://yy.yy.yy.yy/magento/) , it route correctly to local ip url (http://xx.xx.xx.xx/magento/) but fails to launch with following error.
Oops! Google Chrome could not connect to xx.xx.xx.xx/magento/.
Please let me know the fix for this issue.
Note: Global ip is pinging withput any issue .
Also I tried to launch global url from outside my LAN Network.
I can also access just http://yy.yy.yy.yy (WAMP server info)
You need to do following steps:
Open phpmyadmin.
Open core_config_data table.
Change value for value column to http://yy.yy.yy.yy/magento/ where path = web/secure/base_url and path = web/secure/base_url.
I hope you are able to understand my point.

Resources