Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vincej's avatar
Level 15

Homestead: Simple Question

I read that the value of using Homestead lies in that I can perfectly recreate my production server. Ok - but when I follow Jeffrey's tutorial on Larabooks, I do not see him setting up the webserver or the OS, just the DB.

Locally my development machine is Windows 7. So, the value to me would be to perfectly recreate my ISP environment:

Centos, Apache 2.2, PHP 5.4, MySQL 5.6

So am I missing something ? Will Homestead recreate this perfectly ?

0 likes
56 replies
okawei's avatar

Not necessarily, homestead is more of a plug and play box for Vagrant to run Laravel. Vagrant on it's own, however, would allow you to do this. Look into using https://puphpet.com/ which will allow you to create a Vagrant box matching your Prod environment through a form.

Shovels's avatar

One thing to note though is that even with Vagrant/homestead setup you'll still have Windows file subsystem. Which basically means files won't be case sensitive as it would be in the live environment. Apart from that this kind of setup is amazing

keevitaja's avatar

one more thing. windows doesn't have native nfs support, so you will be slow as hell.

you can try to install vagrant-winnfsd for nfs emulation. not sure how well it will play out, but without nfs forget using vagrant.

edit: homestead is provisioner for vagrant

vincej's avatar
Level 15

thanks very much to all - Hmm this VM thing does not sound as appealing as I had thought. Sounds like I either need a linux box for development or I just stick with what I have and suffer the occasional incompatibility issue, which so far has not been too bad.

I do have an old Ubuntu box which I suppose I could use, but then I would have to network to it from windows where all my 3 screens are. bummer

thanks !

keevitaja's avatar

vagrant runs perfectly on mac as well.

if you do not need to use stuff like paid adobe software, microsoft etc, then give ubuntu a try as you development and desktop system. it will make your life much easier.

i used to be a windows user my self while ago and i hated every minute of it. windows is good only for gaming.

1 like
vincej's avatar
Level 15

thanks - I did try Ubuntu for a while, but got frustrated with having to use the command line quite a bit for os functions.

In what way do you find ubuntu works better for you - maybe I am missing something.

keevitaja's avatar

in every way :)

well first of all, linux doesn't get slower with time which windows tends to do. generally with each update windows gets slower, while with linux the effect is opposite. it gets faster. also linux requires less system resources so it is generally faster as well.

in ubuntu all my software is installed and tracked via repositories. so i do not have to worry about updating chrome, sublime or any other software. including the system itself.

things do not break down in linux. i do not remember having issues like suddenly for no apparent reason something is not working anymore. but a distro plays big role in this stability. i have tried other distros beside ubuntu as well but came back to it as it is very stable.

sometimes smaller distros have some issues, but i am not saying that you must use ubuntu. there are other very well crafted linux distros out there. just with ubuntu 99% of the software is available via repositories.

i do not know of which os functions are you talking about, but most things have gui these days. and for a developer command line is a must and linux command line a blessing anyway.

for a developer linux is probably the best os out there.

as i do not play games or use software like photoshop or ms office, there really is no reason for me to use windows. i cannot find a single reason why i should use this badly crafted and insanely expensive software!

1 like
clevonnoel's avatar

I was doing my projects on a windows platform. But then I found a simpler, easier and effective workflow by partitioning my drive and installing ubuntu.

1 like
vincej's avatar
Level 15

I would never use Windows 8 as a dev machine, I would go to Linux before that happened. But so far, with Win7 everything seems ok. My problem is that I have 25 years of Windows experience, and so that is a considerable investment in knowledge.

Valorin's avatar

I have to second @keevitaja's thoughts. I use Ubuntu for everything, and it's perfect for my needs. Unity (the user interface) is minimal and gets out of the way, the terminal is optional but very powerful, and the repositories have almost all the software I need (and PPAs provide the rest).

Definitely give it another try :-)

vincej's avatar
Level 15

Yup - with my next desktop purchase I think I will give it another try. However, it would make it easier if there was one single overwhelming compelling reason, you know ... you can do this one thing only on Linux.

Thanks !

Shovels's avatar

As with any tool each one (Mac, PC, Linux) has its benefits - I wouldn't go as far as to say Windows machines are just for gaming though ;) I've used Ubuntu and it was great, but couldn't get a couple of keys apps running, so ended back up on Windows. I would love to try a Mac, but can't justify the outlay (or the time to get myself up to speed)

I've Windows 7 & 8, and both run homestead/vagrant absolutely fine. And performance isn't an issue either (not that I've noticed anyway)

@vincej if you get stuck setting anything up ping me a message :)

vincej's avatar
Level 15

@shovels Thanks for the generous offer ! As outlined in this discussion, I have been a Windows user all my life. My #1 issue with Windows 7 though is that it is proving to be difficult to replicate my ISP config ( Centos/Apache/MySql) with Homestead and so from time to time I get compatibility errors.

My ideal solution would have been to have retained my IDE and folders in Windows and treated the Vagrant VM as a "remote" staging server where I recreate my ISP config and can test. However, it have proven to be just too difficult to synchronise the environments in real time, allowing me to develop in win7 and test on Ubuntu.

So this week I partitioned my machined and have now got a dual boot Linux Mint 17 (built on Ubuntu 14 LTS). I have the set up pretty well worked out.

BUT !! I can not accept the notion that Linux is as productive as Windows. Basic little things trip you up, like getting my Radeon Graphics card to be quiet, without buzzing like a chain saw. Download 6 different utilities and configure them in the right order. Great. Maybe that's why people buy Mac's ... because secretly they like the ease of use of a Windows-like machine !

So anyway, any suggestions you may have will be gratefully received. Perhaps I can put my ear plugs away :o)

bashy's avatar

Never used to bother me when I used my Windows machine to develop. Got a Mac and everything is just so much more easier.

This makes me sad though, I'm always on cli... it's so fast and powerful

but got frustrated with having to use the command line quite a bit for os functions.

vincej's avatar
Level 15

@bashy Been using the command line for the last couple of days. My brain must have grown as I don't mind now as much as I used to some years ago. And I am sure that in a couple of weeks I will be using it with ease.

My biggest bitch is getting the graphics card to quiet down ... bloody drivers !

Shovels's avatar

@vincej - Yep, I went down that road as well :) And used Linux Mint as my OS of choice - Really impressed, but I found myself unable to use Photoshop, Evernote and a couple of other Windows/Mac only apps. I know there are alternatives, and WINE, but it was a struggle.

Plus I run three monitors, and trying to get that running on Linux is not straight-forward.

I've reverted back to Windows fully now as was getting fed up with switching between the two. I do miss the performance of the linux box, and I actually found the CLI much nicer to use.

Maybe worth just setting up Vagrant with your own bash script, etc. I was using that before switching to homestead and it worked a treat. Unfortunately I don't know enough about homestead to say whether it can be configured with the kind of setup you're looking for

vincej's avatar
Level 15

yeah I thought of just running a vm in windows with Mint, but then, I might as well run my IDE PHPStorm in the VM as well, and whilst I'm at it, I had also better run a browser for testing, and ..... well, bugger it, you might as well run Linux.

I have 3 screens running on Mint with no trouble. I never use Photoshop, and if I do, then I can always switch over if I have to.

I just wish I could get my bloody noisy GPU under control ! That's my biggest issue right now ... and of course learning how Apache / MySqL / PHPMyadmin works under Linux.

I hope it's worth it.

vincej's avatar
Level 15

In an earlier post I asked, "What was the single overwhelming reason to use Linux/Max over Windows for development".

Well - I have the answer, and it is none of those given so far, that the command line is better, or it is faster or it is easier to use, what ever. None of these things are true IMHO. Especially not the "easier to use argument". Nope .. the the single overwhelming reason is that 95% of PHP developers use Linux/Mac and hence, 95% of the tutorials, forum answers, PHP docs assume a Linux / Mac CLI. Look at Laracasts not a single Microsoft word is spoken.

Using Windows in a PHP world is like being a Spanish speaker living in China - sure you can translate .. but what a pain.

That is the overwhelming reason to move to Linux/Mac.

1 like
keevitaja's avatar

Well as you have said many times, you have been using windows for ever. So for you windows is easy and linux is not. And that makes perfect sense!

Still linux offers so much more and when you have the knowledge, things will "happen" much quicker. Once you get the grasp of linux command line with package manager, everything will start to click. Just give it some time.

And there really are no tutorials to check, or papers to read. You just need the will to reeducate yourself.

For the example, try first to set up gulp, git and composer in windows and then try the same thing in linux. Wait a while and then update everything. I bet in linux you will accomplish this task 10 times faster compared to windows.

It will not happen over night. I know many linux users, who still install stuff by downloading *.deb files and then install them "manually" by clicking. For them linux really does nothing and lot of people, who are using linux, are not using it as it is meant to be used!

vincej's avatar
Level 15

Yup - good point. It takes time.

Now I am struggling to create virtual hosts in Apache. They work with a simple html file, but when I try to run Laravel "Welcome" screen all I see is the list of directories in Laravel.

bashy's avatar

Set the DocumentRoot to /what/ever/laravel/public?

Apache stuff is pretty basic

keevitaja's avatar
➜ sites-available pwd
/etc/apache2/sites-available
➜ sites-available cat blog.conf 
<VirtualHost *:80>
 ServerName blog.local
 ServerAdmin keevitaja@gmail.com
 DocumentRoot /var/www/blog/public

 <Directory /var/www/blog/public>
         Options +Indexes +FollowSymLinks +MultiViews
         AllowOverride All
         Order allow,deny
         Allow from all
         Require all granted
 </Directory>

 ErrorLog ${APACHE_LOG_DIR}/error.log
 CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>
➜ sites-available  

and you also need to link the file

➜ sites-enabled pwd
/etc/apache2/sites-enabled
➜ sites-enabled sudo ln -s blog.conf ../sites-enabled/blog.conf
➜ sites-enabled sudo service apache2 restart
 * Restarting web server apache2 [ OK ] 
➜ sites-enabled  
vincej's avatar
Level 15

Found the answer on StackOverflow: I had to change the permissions:

chmod -R 777 Mysite/app/storage

Once done - I get the splash screen.

bashy's avatar

That's a default Laravel requirement ;)

Quote from install docs on laravel.com

Permissions

Laravel may require one set of permissions to be configured: folders within app/storage require write access by the web server.

vincej's avatar
Level 15

Still getting used to managing Linux permissions. Hmm .. must read the docs better.

Next

Please or to participate in this conversation.