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 I'm working on getting my first webserver setup. Are there standard folder locations that my webserver should serve from? In the past, I've use var/www/vhosts/ Since it's just for me, should I just use /var/www/ Also, how do I get ftp working to access that directory so I can upload my php application?

share|improve this question
up vote 1 down vote accepted

Under Ubuntu (and most other Debian based distros) the default site is located at /var/www/. I personally use folders under /var/www/ for the individual virtual hosts, generally named after the primary domain (i.e. the one used as ServerName in the apache config).

However, you can use just about any location you need/want. I have administered servers where sites were located under /opt/ or under /usr/local.

The easiest way to get ftp working is by setting up ftp accounts that have their home folders in the root folders of the related websites and making sure that these accounts are members of the apache group.

share|improve this answer

Honestly, it really doesn't matter where the files reside. Do whatever you're most comfortable with, keeping in mind that it's a good idea to maintain a somewhat organized folder hierarchy. I usually do something like:

etc., etc., etc.

FTP server setup instructions really depend on which FTP server you're hoping to use. If you're open to it, though, I'd highly recommend using SCP instead of FTP. SCP works using the ssh daemon that you already likely have running on that server. It's much more secure, and one less service you'll need to manage/patch/etc. going forward.

share|improve this answer

As the others have said, it doesn't matter as long as the web server knows where you've put them! So if you're using Apache for the web server, and you've decided to put your files in a directory located at /free/beer, you'll have to tell Apache that it needs to look in /free/beer for the files (i.e. DocumentRoot)

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.