Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So there are really two main issues I'm having. I've created a VM with VirtualBox, using Bridge for the network setup. The OS I chose is CentOS and everything has been smooth thus far.

I'm not at the point where I've installed Apache2, MySQL and PHP. The configuration runs fine locally, within the VM itself but this leads me to Q#1:

1) How can I make it so that my main development computer can access the VM Development box via the VM IP or name?

Secondly, when I installed all of the software with "yum", I was operating as the "root" user. It was recommended by certain people that this was the best thing to do... that's all fine and dandy, but I need to make sure that Apache has the rights to modify the right files and folders (apache specific stuff, as well as my virtualhost sites). This leads us to Q#2:

2) What permissions are best and for what files/folders? I mean, what would the ideal setup be if I were to enable FTP support and allow my development computer to transfer files over and deal with the VM like it was a remote development server?

I appreciate your help!

share|improve this question
So you have two questions, it's usually best to only ask one question per post to help the site be more focussed. – EightBitTony Jul 21 '11 at 20:40
Sorry. They go hand in hand. – dcolumbus Jul 21 '11 at 22:59

In answer to #1 - you don't tell us what your host OS is. I'm guessing Windows.

If you picked Bridged, your OS install should a get unique IP address from your DHCP server. You should find on the host computer you can connect directly to that IP address (via SSH for example). Other hosts on your network should be able to connect to that IP address as well.

From within the Guest, use ifconfig as route to find out the IP address, and then from the Guest or other machines, just connect to that IP address.

share|improve this answer
Yeah, but through the browser? I'd like to be able to view the virtual hosts like:, /vhost2, etc... or maybe even as subdomains. – dcolumbus Jul 21 '11 at 23:02
@dcolumbus: You appear to be jumping in at the deep end. You need to invest some time to understand the technology you are working with. is just a plain url. vhost1.some.tld mapped to it's own VirtualHost (or similar) definition is Name Based Virtual Hosting. – Iain Jul 22 '11 at 7:49

As you have set your networking in bridged mode then it should be fairly easy to access your guest from your host machine. Unless you have assigned an IP address to your VM then it will get an IP address from your main DHCP server. If you didn't assign an IP address yourself you can run


on your guest to see what address was assigned. You can then access your guest using that address e.g.




As to what permissions that depends on various things. If it's just for you then I would probably set the DocumentRoot ownership and group to that of your account and have the apache user access it through world read so for files 644 and for directories 755.

share|improve this answer

Your Answer


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.