I would like to be able to share Laravel application hosted on a local Homestead Vagrant VM to users online.
Is there a way I can easily do this like Valet does? I have too many sites and configurations made to switch over to Valet hence I'm look for a retrofit solution with my existing Homestead setup.
You can try using vagrant share
https://www.vagrantup.com/docs/share/
Related
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.
I'm learning Laravel, and I successfully installed Valet. Did some basic development. Then moved on to other things totally unrelated. About a week later (today) I visited two sites (in Chrome and Safari Mac):
postmarkapp.com
getsatisfaction.com/activeinbox
And I get "Valet - Page Not Found".
I do not get this issue any other website I visit. And I've never seen something selectively take over a site like this. It's obviously related to my local configuration but because I'm new to Valet I have no idea where to start with this.
What is happening?
How is this possible?
How do I resolve this?
What is happening?
Your network configuration is pointing those domains to valet instead of looking them up through external name servers.
How is this possible
Laravel Valet uses dnsmasq so you don't have to worry about editing your /etc/hosts file for each dev site you create. It can step in and provide ip resolution before looking externally for an ip address.
How do I fix this
From a terminal run:
valet domain test
valet restart
My guess is you changed your domain on valet to com and the reason other sites are working is their ip addresses are already cached locally.
In your project directory, you will need the public folder.
To get this, copy the public_html and duplicate it.
Proceed to rename it to public
If it's a new project, create the .env file and run php artisan key:generate
Then valet restart and you'll be good now.
Already I have hosted my laravel project http://1d1s.co and working fine. Now I wanted to create dev environment as a subdomain like http://dev.1d1s.co. Kindly help me to do.
First of all, check if your hosting and DNS provider allow subdomains.
Then, you can folow
this example
if you're using Apache2
If you're using nginx, try following this guide
I already have a running server and i just want to get laravel homestead on it.
All the tutorials are about how to install it on a localmachine or on a virtual machine.
Homestead is VM box, it was created to copy usual server environment for using on any local machine. You absolutely do not want to use it on your server for production.
According to the Laravel Docs Homestead is intended to use only in the local development.
It is just a pre-packaged Vagrant box that provides you a wonderful development environment without requiring you to install PHP, HHVM, a web server, and any other server software on your local machine.
Source : Laravel Docs
You may need to look on the forge which does the same on production server.
You can learn more about forge here
I have successfully upgraded to Vagrant 1.5 but when I have made a share link like so: http://hard-sloth-1476.vagrantshare.com/ I just get the Apache landing page and not my site. The site is built with Laravel and when I navigate locally to the VM http://192.168.33.11.xip.io it all works fine, but i just get this page:
When using vagrant share
So how does one fix this ?
It appears that you will need to create a virtual host on vagrant for the vagrant share generated url.
It's likely your apache/nginx config doesn't resolve that url to your server. https://httpd.apache.org/docs/2.2/vhosts/name-based.html
You need to specify that your new vagrant share url points to your virtual host on the web server.