Difference between revisions of "Adding Apache Shares"
Jump to navigation
Jump to search
m (Protected "Adding Apache Shares" ([edit=comp] (indefinite) [move=comp] (indefinite) [read=comp] (indefinite))) |
Latest revision as of 02:09, 31 December 2010
On the webserver, the private apache shares are under /var/www_private and the apache password hash files are under /var/www_passwd/. The apache configuration file that controls private shares is at /etc/apache2/sites-available/private.
1. Create a new entry in /etc/apache2/sites-available/private
<Directory /var/www_private/testshare/> Options +Indexes AuthUserFile /var/www_passwd/testshare.pwd AuthName "Please Log In" AuthType Basic require valid-user </Directory>
2. Reload apache to activate the configuration changes:
/etc/init.d/apache2 reload
3. Create a new directory for the files:
cd /var/www_private mkdir testshare chown wwwprivate:wwwprivate testshare
4. Create an apache password for the new share and add the first user:
htpasswd -c /var/www_passwd/testshare.pwd iacadmin New password: Re-type new password: Adding password for user iacadmin
5. Add other users: note the lack of the -c argument which would erase an existing file
htpasswd /var/www_passwd/testshare.pwd brian New password: Re-type new password: Adding password for user brian
6. Add symlinks so users can find the share easier when logging in: optional
cd ~ashley/ ln -s /var/www_private/testshare/ testshare ls -l lrwxrwxrwx 1 root root 27 2010-01-15 15:40 testshare -> /var/www_private/testshare/
7. The new share is ready! The link is http://www.iac.isu.edu/private/testshare/