Apache forwarding users to their homedirs
Hi there!
I am fairly new to Apache, but would like to make a simple HTTP download server using either myown PHP or the nice WebFileBrowser script set. Here are my questions: 1) Would someone be good enough to point me in the direction of where I can make a decent login page? 2) I also need a pointer about where I can find more info about how Apache forwards a user to their home directory. Thanks for your time! Dan |
I think you want to look at using userdir options in apache. Just look for the httpd.conf file somewhere on your machine. Edit this file. Look for the section that talks about userdir's. You should also search the apache website. There is a nice howto on there that explains how to setup userdir's so you can enter a URL like http://yourdomain.com/~yourname and it will take the browser to a user's home directory.
|
home dirs
each user needs a foler public_html,
in the /etc/http/conf/http.conf set servername to the server name. put a hash, in front of disable user_dir, delete the one in front of enable user_dir restart httpd then each user must do these two steps. then for each user chmod 711 user_home_dir then for each users publiv_html chmod 755 -R public_thml |
OK, I see that. Thanks - that will work.
So how do users log in? Keep in mind, I'd like to make a login page of some sort. |
Well, that's another can of worms. Shown below is the method I'm using. I'm absolutely sure somebody will come along behind me with another method that is better or simpler, but this is just what I'm using because its convenient for me and I can use an automated script to make these whenever I need.
First, create a file (called .htaccess) that looks like this... Code:
AuthUserFile /path/to/your/.htpasswd Now create another new file (mine is called "crypt_pass.pl") and put this inside... Code:
#!/usr/bin/perl Now take the output and use it in another file... This file is called .htpasswd.... [code] yourusername:cryptedoutput [code] Where "yourusername" is whatever you used in the .htaccess file above and "cryptedoutput" is whatever crypt_pass.pl generated for you. I really recommend searching for info about .htaccess and .htpasswd and see how other people suggest doing it. LIke I said, there are a lot of ways you can do this, and there are bound to be ways that are better or simpler for you. |
Donboy,
OMG, that is a lot of thought you have just given me. Can I buy you a pizza? I will try it out & let you know how it goes... |
All times are GMT -5. The time now is 02:54 AM. |