Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Since editing files live from a remote server slows down development. I use XAMPP on windows to develop then run the web app's on a Linux server.

However to avoid environment dependencies I'd like to mirror the live environment and the development environments.

What I'm asking is running development server on Ubuntu inside VirtualBox whilst editing the source files via ftp/Dreamweaver is a good idea?

If so, and I wanted to view the local website on the host OS (windows) how would I do this? does the guest OS have a LAN/Local IP address? I notice on windows "ipconfig /all" there are "tunneling" adapters which I assume is for VirtualBox, so I guess the guest OS has the same LAN/Local IP address? if so how would I view the websites hosted on the guest OS on the host OS?

I'd also need to host FTP server on guest OS.

Note: I need windows! I would love to use Linux all the way -.-

share|improve this question
1  
1) Too many questions at once; 2) You should configure your Virtual machine to run in bridged/NAT mode; 3) Then edit your hosts file (C:\Windows\System32\drivers\etc\hosts) and create fake domain name (e.g. mysite.dev) and point to Virtual Machine's IP. 4) This question should be moved to SuperUser site .. or maybe ServerFault. –  LazyOne Jul 7 '11 at 23:20
add comment

2 Answers

It is possible to run a LAMP server in a VM, using VirtualBox or the like. There is a little bit of fiddling with settings to be done, but you can do your editing in Dreamweaver on Windows, and have the virtual server serve it up. This is useful to avoid cluttering your main system with server-related processes.

SitePoint did a useful tutorial on setting this up some time back. Following the instructions, it is not much trouble to get working. The tutorial is slightly dated but the steps should be the same.

It is also possible to set up a folder on your host system which is shared by the VM, so you can host your site there and not need to FTP files into the virtual server.

share|improve this answer
add comment

I started writing that using a virtul guest for testing would be good, then changed my mind. Your designing in windows then you have to transfer the files to the local guest virtual server for viewing and testing but you want to be able to view in your windows browser. It's just far more complex than it needs to be to setup. While it is possible it just seems more work than you need to do.

Instead, install an ubuntu server as a guest on windows or as a dual boot. Do your editing in the ubuntu guest and save the files there without transferring form host to guest virtual server. Also you can run firefox and chrome within the unbuntu system allowing you to test them there. You only need to shift things about then to test in windows.

Since your are making php apps, I would guess that you don't really need Dreamweaver. Some other editor could do. Personally I use Bluefish in Ubuntu. However if your really are wed to Dreamweaver then you can get that running in Ubuntu using Wine. That way all your design work will be made and tested in one system without any file transfers other than to FTP to the live server. Since your using Ubuntu in a virtual box, you can jump back to windows for your other essential application when you need to.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.