Apache2 & FTP

Asked by Jburhans on 2011-03-03

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.

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apache2 Edit question
Assignee:
No assignee Edit question
Solved by:
Geoffrey McClinsey
Solved:
2011-03-04
Last query:
2011-03-04
Last reply:
2011-03-04
Best Geoffrey McClinsey (geoffmcc) said : #1

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.

Jburhans (jburhans) said : #2

Thanks Geoff McClinsey, that solved my question.

Jburhans (jburhans) said : #3

Thank you!

Geoffrey McClinsey (geoffmcc) said : #4

No problem. Glad I could help