Vagrant 1.5 share feature & Laravel - laravel-4

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.

Related

Laravel subdomain in shared hosting

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

How can I access a webpage located inside a VM from the host machine's browser?

I am able to access the link http://localhost/men/tops-men/jackets-men.html successfully from my VM (configured using X2Go client).
IP Address of the VM: 10.146.106.204
I am also able to ping the VM successfully from my host machine (Windows).
The page that I am trying to access is a php page deployed on Apache Web Server.
However I am not able to do so from my Windows host machine.
I tried http://10.146.106.204/men/tops-men/jackets-men.html from my Windows machine but it did not work.
Do I have to configure something on my host machine or on my VM ?
Not sure what I am missing.
On VM check you can view http://10.146.106.204/men/tops-men/jackets-men.html
If not you need to configure the web server to listen on that IP (if you're running IIS this is under "bindings" in the right-hand side panel of IIS Manager).
On Host open a cmd window and check you can ping 10.146.106.204
If not check your firewall settings on the VM.
If neither of these 2 things help then you need to add more information about your setup to the question. Those are 2 very simple things you can do to diagnose 2 basic problems you might be having.
I was finally able to solve the problem based on this SO link: Unable to access magento site from anywhere but localhost
Updated the DB table core_config_data and updated the data by replacing http://localhost with http://ip-of-vm and then restarted the apache web server.

Sharing sites quickly like Laravel valet

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/

Forge/DigitalOcean - This site can’t be reached

This is my first experience with Forge. So I created DigitalOcean account, had Bitbucket from before, made repository. Added .env to environment variables in Forge.
On server IP adress getting
This site can’t be reached
Try:
Reloading the page
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
What am I missing?
Somehow when server was installed it did not install nginx, and all what was necessary. In Forge was listed what was installed and that was clearly missing. So I decided to destroy it and install new server. New one works like it should.

How to get Laravel homestead on server

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

Resources