Nico Knoll Posted June 3, 2014 Share Posted June 3, 2014 Hey, since I started developing for the web I used XAMPP. It's a program which comes with PHP, MySQL and a full Apache installation. It works great. But somehow I don't want to merge this with my regular PC. Some time ago I read something about Virtual Machines. It sounds like it is possible to create a Linux Server in it and work with it like with a "real" server. Sounds clean and therefore great to me. But I have no idea how to create it. And is it still possible to use these fake "hosts"-file URLs like "processwire.dev", etc. with it? How does your setup looks like? And is it possible to reset a VM to a certain point? -- Nico Link to comment Share on other sites More sharing options...
mr-fan Posted June 3, 2014 Share Posted June 3, 2014 for devs easyphp project is also a great option but no vs! http://www.easyphp.org/ 1 Link to comment Share on other sites More sharing options...
kongondo Posted June 3, 2014 Share Posted June 3, 2014 (edited) I had a nice tutorial somewhere about creating virtual hosts...can't find it now. I even did this some time back. It's all about editing your PC's host file (to serve your fake hosts) plus your appache httpd.conf, if I remember correctly...I use XAMMP with a customised start screen Edited June 3, 2014 by kongondo Link to comment Share on other sites More sharing options...
Nico Knoll Posted June 3, 2014 Author Share Posted June 3, 2014 Well vhost is not the problem - I got it working with XAMPP already. The question is if it works with VM to Link to comment Share on other sites More sharing options...
adrian Posted June 3, 2014 Share Posted June 3, 2014 I think you probably know this already, but you can create a linux VM using one of these: vmware fusion parallels bootcamp I have only used fusion and only for a windows VM, but it should be straight forward to install debian or similar through one of these too. 2 Link to comment Share on other sites More sharing options...
owzim Posted June 3, 2014 Share Posted June 3, 2014 You might want to check out Vagrant: https://processwire.com/talk/topic/5993-vagrant/ and http://www.vagrantup.com/ There are predefined server images with predefined configurations out there in the web, just search for it. It's a bit of a learning curve, but then it's great. The actual files/folders in the Apache are symlinks to folders on your host system, so no worries if you f*ck up the VM, just reinstall with the given config, piece of cake. Regarding your .dev domains, that's something you always manage on your host system, not the VM, so your hosts file must redirect your desired .dev domains to the IP of the VM (or you set up something like dnsmasq, where you can write wildcard rules and don't have to add every single .dev domain to the hosts file). The Apache on the VM then should handle the requests and map to the specific folders (via vhosts). But that's all pre-configurable with Vagrant, check out https://puphpet.com/, they have a guided image creator for Vagrant. Link to comment Share on other sites More sharing options...
pwired Posted June 4, 2014 Share Posted June 4, 2014 VMWare workstation/server http://www.vmware.com/products/workstation/features.html http://www.vmware.com/products/vsphere-hypervisor Link to comment Share on other sites More sharing options...
purwa Posted June 5, 2014 Share Posted June 5, 2014 You might want to check out Vagrant: https://processwire.com/talk/topic/5993-vagrant/ and http://www.vagrantup.com/ There are predefined server images with predefined configurations out there in the web, just search for it. It's a bit of a learning curve, but then it's great. The actual files/folders in the Apache are symlinks to folders on your host system, so no worries if you f*ck up the VM, just reinstall with the given config, piece of cake. Regarding your .dev domains, that's something you always manage on your host system, not the VM, so your hosts file must redirect your desired .dev domains to the IP of the VM (or you set up something like dnsmasq, where you can write wildcard rules and don't have to add every single .dev domain to the hosts file). The Apache on the VM then should handle the requests and map to the specific folders (via vhosts). But that's all pre-configurable with Vagrant, check out https://puphpet.com/, they have a guided image creator for Vagrant. Will it run smoothly on older/slower machine? I have an old white macbook with archlinux installed (I use it when bored/tired working on my desktop). Link to comment Share on other sites More sharing options...
owzim Posted June 5, 2014 Share Posted June 5, 2014 Will it run smoothly on older/slower machine? I have an old white macbook with archlinux installed (I use it when bored/tired working on my desktop). Well it's the same with all VMs, they'll never run as performant as the host system itself. Link to comment Share on other sites More sharing options...
Recommended Posts