Apache2 & FTP

Asked by Jburhans

Can someone tell me the file location for the default web page in Apache2? Also, when I FTP into the system I see all the files rather than just the web files. New to Ubuntu so just looking for a little help. Do I need to create a seperate FTP user? I have been logging into my admin account.


Question information

English Edit question
Ubuntu apache2 Edit question
No assignee Edit question
Solved by:
Geoffrey McClinsey
Last query:
Last reply:
Revision history for this message
Best Geoffrey McClinsey (geoffmcc) said :

The default location for the website would be /var/www

Having said that, only root or members of www-data group have access to write to that directory. So you would have to add your user account to the group www-data so you could upload your files.

Another option would be to use vhosts. With this method you can put a public_html folder right in a users home dir and setup apache to look there. Then when you connect with the user account you just have to go into public_html/public

mkdir -p public_html/{public,private,log,cgi-bin,backup}

[see] http://articles.slicehost.com/2008/4/29/ubuntu-hardy-apache-virtual-hosts-1 for more info.

You also mentioned using FTP. A more secure method would be to use SSH/SCP to upload your files.

Revision history for this message
Jburhans (jburhans) said :

Thanks Geoff McClinsey, that solved my question.

Revision history for this message
Jburhans (jburhans) said :

Thank you!

Revision history for this message
Geoffrey McClinsey (geoffmcc) said :

No problem. Glad I could help