[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] Re: htaccess not working
- Subject: [cobalt-users] Re: htaccess not working
- From: "Linuxman" <linuxman@xxxxxxxxxxxxxxxx>
- Date: Thu Nov 21 18:09:00 2002
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
This is my ".htaccess for dummies" directions that I made for myself. It
works for me and I use these instructions every time I set up a new
directory:
Setting up .htaccess
1) Put the following at the bottom of /etc/httpd/conf/access.conf
<Directory /home/sites/site1/web/can>
AllowOverride All
Options All
</Directory>
2) Change AllowOverride from 'None' to 'All' in 2 places in
/etc/httpd/conf/access.conf if not already done
3) Create a .htaccess file in the directory to be protected as follows:
#Access file
order allow,deny
allow from all
require valid-user
AuthPAM_Enabled off
Authname canuauthme
Authtype Basic
AuthUserFile /home/sites/site1/web/can/robboard/.htpasswd
4) Create a password file in the directory to be protected
(/home/sites/site1/web/can/robboard) by typing:
htpasswd -c .htpasswd [username]
5) chown the 2 files to admin.
6) chmod the 2 files to 755
7) Rebbot the server - typing 'httpd restart' is not enough
Comment in step 7
Comnent 1:
That should not be necessary.
/etc/rc.d/init.d/httpd reload or at worst
/etc/rc.d/init.d/httpd restart should do it.
--
Dan Kriwitsky
Comment 2:
I use kill -HUP `cat /var/run/httpd.pid`
(kill -USR1 is what httpd reload actually does) re the Apache docs at
http://httpd.apache.org/docs/stopping.html which gives some useful
information
about tailing the error log so you can see if there are problems when
httpd
restarts.