Apache, FTP and Users
I just recently installed Slackware 9.0 and succesfully set up Apache, PHP, and MySQL. The default page is showing up and everything is running smoothly. What I want to do now is be able to add users and give them webspace. Detailed things concerning this are:
1) Giving them a subfolder (ie link.com/newbie) 2) Ability to use FTP, but only letting them see their OWN folder, not any others. 3) (Extra) Subdomain. (ie newbie.link.com) lol. Thats about it, I've road so much information on this, but can't seem to find the answer. Any help is greatly appreciated by this apache newbie. :-D Thanks in advance, -zero |
Re: Apache, FTP and Users
Quote:
apache will send all link.com/~newbie requests to newbie/public_html dir. Quote:
anonymous_enable=NO local_enable=YES chroot_local_user=YES chroot_list_enable=YES chroot_list_file=/etc/vsftpd.chroot_list then create the /etc/vsftpd.chroot_list file and put the usernames you DO NOT want to be chroot'd in there (your own etc....) then restart the daemon. Quote:
Jesse |
In your root dir you can add folders for users. The default directory for Apache is /usr/local/apache/htdocs or at least when I install from source. You can change the default directory in the config /usr/local/apache/conf/httpd.conf . Also in the config you can specify subdomains, its called "VirtualHost" in the config file, if you need help I could help with that also. Now about the FTP, you can use PureFTPd which is a really nice FTP server, which supports virtual users. Virtual users would allow for "only letting them see their OWN folder" and that is called chroot -ing. PureFTPd is at http://www.pureftpd.org
|
I added the folder to /etc/skel and I also downloaded and installed PureFTPd.
Apparently my other FTP Server Program (ProFTPd) is using the address, so I can't use PureFTPd. Is there anyway I can disable ProFTPd? or is ProFTPd better? I think I will need some help with Apache's VirtualHost sytem. I'm sorry for being a complete newb lol. A friend of mine said "We were all newbs at least once, unless you were born into the class." lol. Thanks for your help so far. =) -zero |
NameVirtualHost *
# # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # <VirtualHost *> ServerAdmin user1@email.com DocumentRoot /home/newbie/public_html ServerName newbie.link.com ErrorLog logs/newbie.link.com-error.log CustomLog logs/newbie.link.com-access.log common </VirtualHost> <VirtualHost *> ServerAdmin user2@email.com DocumentRoot /home/newbie2/public_html ServerName newbie2.link.com ErrorLog logs/newbie2.link.com-error.log CustomLog logs/newbie2.link.com-access.log common </VirtualHost> etc etc etc for proftpd find the proftpd.conf file and add DefaultRoot ~ in the file and then restart the daemon... this will chroot all users to their home dir's.... if you want to create a "special group" that will NOT be chroot (your self).. mkgroup then add your self to that group... then add this line instead: DefaultRoot ~ !ftp-special (were ftp-special is your group) good luck |
switch to VSFTPD... jailing users works great... very secure, very fast...
|
Quote:
Quote:
|
All times are GMT -5. The time now is 12:41 AM. |