I just installed Ubuntu 17.10 and I want to try create a website using Laravel, but I hit a rock, I followed the instructions. step by step on the official website. But I think something is missing,
Because I haven't touch / edit anything in Homestead.yaml, so basically it would working right?
I already use vagrant up --provision. already create the ssh key. I already googled it and try several ways but it doesn't fix it, I already turn on my XAMPP as well
Sorry but I never touched Ubuntu before, so I'm very blind using this OS
Here is my Homestead.yaml file
Homestead.yaml
and the directories of /home/workspace/ and /home/workspace/Homestead/
~ Dir
Homestead Dir
my Hosts file
Hosts File
EDITED:
I just create a new project in ~/Homestead/Projects/[it goes here] because the default laravel installation is working already, so now I want to create a new project in Projects folder inside Homestead, but why it redirect the url to https?
The folders
in this screenshot: https://i.stack.imgur.com/4cxGy.png Your ~/code folder appears to not exist, which means Homestead will not map it. Create that folder in your Host OS (Ubuntu 17) and then run vagrant destroy && vagrant up If you still have issues post the entire output here for us to check.
For my last question, why when I tried to open my new projects is always giving me this error your internet connection is not private. it's because I'm using .app or .dev in the of the site name, the problem is from google chrome, so I need changed it to .test then it's working perfectly.
I got the answer from this site
https://laracasts.com/discuss/channels/laravel/chrome-blocked-localhost-with-error-your-connection-is-not-private
Related
I haven't got a lot of programming experience but I have found this open source GitHub project (https://github.com/daveroverts/bmac) but I am not sure how I can clone this to my Laravel Homestead virtual machine server.
I have initiated homestead and vagrant, which is running fine but I'm not sure how I can add the GitHub project to the server.
Would I just need to find my code folder and put the files on GitHub into a project folder or would I need to go into the virtual machine with virtual box?
Appreciate your help and sorry that my programming knowledge is so bad.
On Laravel Homestead, you have a shared folder. Anything in that folder can be accessed both through the virtual machine and with normal browsing on your computer. You should clone the project (e.g. project1) into that folder. The path is listed in Homestead.yaml. In this example, you would then map homestead.test to your localhost in your hosts file, and access the site through the browser at homestead.test.
folders:
- map: ~/code/project1
to: /home/vagrant/project1
sites:
- map: homestead.test
to: /home/vagrant/project1/public
You should never have to really "go into Virtual Box" to do anything. Just use a command line to vagrant ssh into the virtual machine and run any commands from there. See https://laravel.com/docs/8.x/homestead#configuring-homestead for the full setup.
I am attempting to set up Homestead on a Windows 10 machine using VirtualBox and Vagrant so it can live in a virtual machine.
Using Git Bash, here is the sequence of steps thus far -
connect to Homestead virtual machine using vagrant ssh
run this command to create a new project called Laravel:
look at folders in Homestead directly on VM:
So far, so good.
Now here is where things don't seem to be working properly -
look in storage location on host operating system where Homestead.yaml is configured to park files
but there are no files there
Two questions:
What needs to be changed so the files appear in the designated location on Z:?
Once the change has been made, how will the files appear there when the project has already been created on the VM?
EDIT:
I was able to remove the original Laravel project using the comment below from #dparoli. After cd code I executed composer create-project --prefer-dist laravel/laravel Laravel but encountered the error shown below: [ErrorException] mkdir(): File exists. I'm guessing there's left over stuff from the first attempt. What should be done to clear up the error?
I have followed the instructions here: http://laravel.com/docs/5.1/homestead to get a local Homestead VM. It worked perfectly and I got Laravel up and running (serve homestead.app /public) and synced to a folder on my host machine (say ~/Code).
After trying to get Xdebug running, I messed up with a few configuration files (nginx.conf, php.ini, etc.). and thus, I destroyed that VM instance by running "vagrant destroy default". I then boot-up the VM again ('vagrant up') and ssh into the box. The files which I changed were reverted (expected) and the ~/Code directory had the Laravel sample app which I had created previously (again, expected as it was copied over from my host machine).
What I don't get is why the server was still running successfully and I could access my sample app from my host machine? I never ran 'serve homestead.app /public' again and yet the server was already running serving the /public folder. I find this very confusing.
So what’s the correct way to destroy and recreate Homestead VMs?
Cheers, SK.
Destroy command does't remove box.
Here is docs. https://docs.vagrantup.com/v2/cli/destroy.html
To delete it:
homestead yourbox remove
if it doesn't work, try
vagrant yourbox remove
I'm starting to develop a site in ubuntu 14.04. I'm using apache2, so I placed my files under /var/www/html/ folder. Everything was working fine, but I had to restart my current work so I copied the entire project folder from another path, like this
$ sudo cp ~/path/to/folder /var/www/html/
And now I can't see my images, a simple imgtag. I just see this.
When I look for the file, I can see that I'm having an error 403 forbidden. I saw some suggestion to add the option Require all granted but that option is already set in my apache. I suspect that is because the new folder is a copy from a folder without root permissions, so I tried chmod but that also didn't work so I'm completly lost now.
So, how can I see my images from localhost? and most important is why this happen suddenly?
I am using Laravel homestead. For a project I need a special vhost configuration, where should I define this?
You add a new folder mapping into the "sites" block of Homestead.yml, like so:
- map: myapp.com
to: /home/vagrant/Code/myapp/public
That's all there is to adding a new vhost. To modify it, edit the appropriate file in /etc/nginx/sites-available. In the above case, this would be /etc/nginx/sites-available/myapp.com
See here for example customization of a newly added vhost. Note that the quick tip linked here uses Homestead Improved, a slightly enhanced version of Homestead, as described here.
More Homestead related posts can be found on our site via the Homestead tag.
I have been looking for a solution for customizing nginx vhosts. You want to do it in provisioning, or better: after provisioning otherwise Homestead will overwrite any changes you have done manually to the vhost files.
One solution is the one I found here:
https://laracasts.com/discuss/channels/requests/homestead-provision-deletes-custom-nginx-settings
Basically you create configuration files in a folder in the host machine, map that extra folder to the vagrant machine, then in your after.sh file (which is run by homestead after the normal provisioning is finished) you just copy all of them to nginx's sites_available folder.