Log in:
Register Now! It's FREE!
Members click here to Sign In!

News
RECENT ANNOUNCEMENTS
Post new topic

apache windows .htaccess question

RealPoor.com » RealPoor General Talk » General Badass
 
 
Author
 
 
Message
 
Posted: 10/05/03 - 12:05
Report abuse 
RealPoor Master of Posts
kireol
Joined: 02 Aug 2003
Posts: 7529
 
I'm running apache under windows.


Trying to set up .htaccess

Read like 92837423894 web pages and somethings still wrong.


Here's what i have so far....

Want to protect my directory /admin (yes I know htaccess isnt very secure)

-----------my .htaccess file (in admin folder)-----------
AuthName "restricted"
AuthType Basic
AuthUserFile /www/htdocs/admin/.htpasswd
<LIMIT GET POST>
require valid-user
</LIMIT>


-------------my .htpasswd file (in admin folder)-------------
chris:$apr1$17/.....$FsoBZpXM08iUEEyFrTRxh1


I dont think i have the authuserfile correct. but i cant figure it out. if you go to http://kireol.redirectme.net/admin you can see that it does find the .htaccess file. But I dont think .htaccess is pointing to the correct spot for the .htpasswd file. I've tried using things like "c:/program files/apache group/apache/htdocs/admin/.htpasswd" but that doesnt work either.


any ideas? I've set this up in linux like a hundred times. first time in windows though


Reply with quote
Posted: 10/05/03 - 13:18
Report abuse 
khrath

 
why you using windows =(


Reply with quote
Posted: 10/05/03 - 13:19
Report abuse 
RealPoor Master of Posts
kireol
Joined: 02 Aug 2003
Posts: 7529
 
cuz it's for my dad, and he can barely use windows let alone linux =(


Reply with quote
Posted: 10/05/03 - 13:35
Report abuse 
Luke Warm
Stixl
Joined: 05 May 2003
Posts: 185
 
http://apache-server.com/tutorials/ATusing-htaccess.html

Pretty good summary there of getting apache running under windows. Make sure you assign the container correctly, renaming that file and redirecting to it looks pretty important. Hell you've prolly already read that page if you went through 92837423894 pages.

Looking at your config it appears set up correctly; try following the guidelines outlined in that page (renaming the file, pointing to it etc) and see if that works. Windows doesnt like files with .htaccess extensions me no think)


Reply with quote
Posted: 10/05/03 - 13:47
Report abuse 
RealPoor Master of Posts
kireol
Joined: 02 Aug 2003
Posts: 7529
 
Stixl wrote:
http://apache-server.com/tutorials/ATusing-htaccess.html

Pretty good summary there of getting apache running under windows. Make sure you assign the container correctly, renaming that file and redirecting to it looks pretty important. Hell you've prolly already read that page if you went through 92837423894 pages.

Looking at your config it appears set up correctly; try following the guidelines outlined in that page (renaming the file, pointing to it etc) and see if that works. Windows doesnt like files with .htaccess extensions me no think)


thx stixl. still no luck. ya, i thought about windows with the file name. but i tried just a normal name "users.pwd" and no luck, and it also tells me something that it finds the .htaccess file and does use it


/frustrated


Reply with quote
Posted: 10/05/03 - 13:59
Report abuse 
Luke Warm
Stixl
Joined: 05 May 2003
Posts: 185
 
.htacess is similar to an access list on a router.

There is an explicit deny all/all on an access list. However, with .htaccess files, there is an implicit Satisfy any.

Try changing it to Satisfy All, see what that does Shocked


Reply with quote
Posted: 10/05/03 - 14:08
Report abuse 
Luke Warm
Stixl
Joined: 05 May 2003
Posts: 185
 
bah looked at it closer.

You need to add quotes around you password file:

AuthUserFile "/www/htdocs/admin/.htpasswd"

second, your directory container class in the httpd.conf file, you need to set the AllowOverride option All or AuthConfig

<Directory ".../apache/htdocs" [or whatever that folder is]>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>

see if that works man. apache in windows is a b***h Wink


Reply with quote
Posted: 10/05/03 - 16:04
Report abuse 
khrath

 
also, more than likely, your dad doesn't need everything on override. Theres certain things disabled for a reason.

AllowOverride All = Not for your daddy


Reply with quote

Post new topic
 
MY NAVIGATOR
 
 
Newsletter
 

Subscribe to FREE monthly RealPoor.com newsletter.

RealPoor.com » RealPoor General Talk » General Badass
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum