Accessing homestead site on another computer in network - laravel

I have set up and my wordpress site on homestead. I have windows machine running it and it works nicely, i can access my configured URL when i edit hosts file. Now i want to access the domain from different windows machine that relies in the same network but this time editing hosts file does not work, it simply cant resolve it and times out. Is it even possible to do that? I would prefer if i can get it working with hosts file and not using vagrant share or similar service like that.
Thanks in advance!

I had the same problem accessing my homestead install across the network until I recently discovered I could perform a Network Preview for my Prepros projects (https://prepros.io/).
Homestead files are mapped to your local computer; adding them to prepros projects will give indirect access to your homestead website.
Its been working quite well for me.

Related

Network share is not accessible when Powershell script is running under another user on local machine

I've got the following situation and looks like answer is somewhere in settings but it looks like general win10 settings/restriction.
When I'm trying to run PS script under local admin account and trying to access any network share: copy file, new view - then I'm getting access denied. If log in under this user and try to open share in Explorer, then it works fine for some time, but after restart I'm getting same issue.
Environment: simple network, workgroup, no domain, share is open for everyone (I've tried Synology NAS and share on another Win10 machine - same results).
How I can workaround this?

PhpStorm crashing whilst indexing Laravel

I am running a 5 or 6-year-old Dell laptop the Inspiron 3521 with Ubuntu 14.04 - yes I know it's old.
I have been using PhpStorm on small projects with no issues. However I am just getting into Laravel and have initially it up on a virtual machine with Laravel Homestead. All good so far: I can view the base Laravel website on my host machine.
Now I think to myself lets create a project using the synced Laravel directory on my host machine as the base. This is where I run into trouble. Crash Crash Crash. I thought at first the issue was that I had opened PhpStorm as a user with insufficient permissions for the directory and the files. So I deleted the .Phpstorm config and system files. No joy.
Could it be a memory issue I asked myself being an older machine - I had not had this problem previously when using PhpStorm. So I enabled some Swap memory.
I am at this point baffled and will think about using Sublime or some other IDE.
Anyone out there have a similar experience. Am I going about something in the wrong way looking to create a project with the synced directory, is there a more clever way of going about this?
Here is the Java error log hope it makes sense to someone :)

Vagrant virtual box returns ERR_CONNECTION_REFUSED from browser

I'm very much a Vagrant noob so hope this is an easy issue to fix issue.
I've set up a Vagrant ubuntu/trusty64 box that aliases to an existing directory on my local machine that hosts the development files for a website. I gave the box an IP address (192.168.44.44) and set up domains in my 'hosts' file.
I can ssh into the box no problem and can navigate to the aliased files from within ssh. So the box is working as expected.
I can open a cmd window and ping both the IP address and domain without an issue.
But when I try to access the IP or the domain from within a browser I get an ERR_CONNECTION_REFUSED error. The error appears immediately without any delay.
I'm on a Windows 10 machine. Hope someone can help.
It turns out that the trusty64 box is just Linux but doesn't start with Apache. My other test environments when I looked at them were all LAMP boxes. So the reason all the various tests were working except for the browser was because Apache hadn't been installed.
I hope this helps someone if they have a similar issue.

Slow File Uploads on virtual machine using virtualbox with vagrant + homestead

So i setup a virtual machine with vagrant using the virtual box container provided by laravel's homestead. (on my osx env)
I used the nfs option method of sharing my directories to my local environment and this speed up response times drastically. On a typical app, i'm getting like 20-40ms load per page. However, I noticed that file uploads are terribly slow. I can upload a 1MB file on a simple form that does nothing to the file and it will take about a 30seconds to a minute. Is this normal, or is there a way to speed things up even further besides using nfs shares.
This has been driving me crazy for some time, and no amount of toying with Vagrant's or VirtualBox's settings (sendfile, NFS, adjusting packet sizes, etc.) helped. But with the help of this answer on a similar problem relating to failed image uploads, I've finally cracked it:
The key, for me, was changing my hosts file to resolve my Homestead domains to the homestead VM's IP of 192.168.10.10, rather than to 127.0.0.1. (When doing this, you also drop the port :8000 from the URL, so you just navigate to homestead.app).
This changed my file upload speed from around 25 KB/sec to 5980 KB/sec!
It appears that the Laravel docs were updated a week ago to reflect this change. I wonder if your Yosemite install coincided with the docs change, and you set up your new box with 192.168.10.10 while your old hosts setup pointed to 127.0.0.1.
Even though the Laravel docs have been corrected—so this issue shouldn't present itself for new Homestead installs—there are still a lot of tutorials floating around in the wild that suggest resolving Homestead domains to 127.0.0.1. Hopefully this answer will help head off some aggravation!
Things that come to my mind:
Edit /etc/nginx/nginx.conf, find the "sendfile" setting and change it to "off" (I've seen some reports of people having some issues with it turned on when using NFS);
Having xdebug enabled slows things down, and although I wouldn't expect it to make such a huge difference as the one you're noticing, if nothing else works it might be worth disabling it and see if helps;
If none of these help, create a repo on github to recreate the issue and I'll have a look, see if I find anything.

Wordpress paths in VMware virtual machine

I am trying to test my local Wordpress site in a VMware virtual machine running Windows, but links are broken! The site is loading, but not the CSS or the images. All the non-wordpress sites are running perfectly.
I assume this has something to do with the paths that Wordpress create, they are still 'localhost' even tho I am accessing my site in windows with the virtual host 'mysite.wp'.
I think you can just use Chrome Ctrl+Shift+I to show the source of the wordpress page, and just find the CSS and image in the source. And to analyse the it.
But I just guess, you may reset the permission of the wordpress folder. If you use Linux as the server, you must give the read permission to the folder. I think.

Resources