Closed Thread Icon

Preserved Topic: apache access-rights on windows (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=21005" title="Pages that link to Preserved Topic: apache access-rights on windows (Page 1 of 1)" rel="nofollow" >Preserved Topic: apache access-rights on windows <span class="small">(Page 1 of 1)</span>\

 
GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 12-11-2001 23:19

im running apache on a win2k and i wanna protect everything (root and all subdirs) with the same user/pass.
so, what changes do i have to make to what files? (i cant find a .htaccess here)
thank you very much in advance!



Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 12-11-2001 23:42

GRUMBLE: Why not add one (or does this not work)?
www.gurusnetwork.com/tutorials/misc/htaccess.html

Emps

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 12-12-2001 01:44

emps, i know that tutorial and it was also the reason why i posted this.
i just couldnt find that .htaccess and the tut refers to *nix machines.

anyway, im gonna add this file, but how would it look like?

edit: hmmm, i cant add a .htaccess file. windows wont let me.





[This message has been edited by GRUMBLE (edited 12-12-2001).]

Ronin
Obsessive-Compulsive (I) Inmate

From: Michigan
Insane since: Sep 2000

posted posted 12-12-2001 01:57

How are you trying to create the .htaccess file? You shouldn't have any trouble creating it under Win2k or NT. You might have to use a more capable text editor than notepad if that's what you are using.

.htaccess should work under Apache on Windows. Its a feature of Apache, not just Unix.

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 12-12-2001 02:17

2 things.

.htaccess files are not set anywhere in particular. Those settings are set usually in your httpd.conf with the ability to put individual .htaccess files in certain subdirectories.

Second I don't think you can create files that start with a period on some Win32 systems. A trick that may let you get around this is to create a .htaccess file and then ftp it to the proper directory or rename it via ftp

Actually thinking about it since you want everything protected you may be able to put the lines you want to put in your .htaccess file straight in your httpd.conf



:[ Computers let you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila. ]:

[This message has been edited by bitdamaged (edited 12-12-2001).]

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 12-12-2001 03:12

GRUMBLE: I think I'm starting to understand - Windows might have trouble seeing files that start with a period (I know that a lot of FTP software for Windows does I just haven't tried it on Windows, I think, or if I have I didn't remember) so if you were to create a text file called htaccess.txt (you can just do it in Notepad its all I've ever used) and then change its name to .htaccess it might 'disappear' but it is still there and you should notice its effects. Try www.smartftp.com for software that will see these kind of files.

I hope that explains things a little better,

Emps


You're my wife now Dave

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 12-12-2001 07:37

Under Windows, I prefer to name my .htaccess files like this "ht.access" instead. So, to make them work with Apache, modify the following lines in your httpd.conf file:

-change
AccessFileName .htaccess
-to
AccessFileName ht.access

-change
<Files ~ "^\.ht">
-to
<Files ~ "^ht\.">

Now, you can name your .htaccess file like this "ht.access".

To find out how to create appropriate .htaccess file (used for authentication) read this page: http://httpd.apache.org/docs/howto/auth.html BTW "htpasswd" program, which is mentioned on that page can be found in "Bin" folder where your Apache is installed. Also note that passwords on Windows are encrypted differently (using MD5) than on Unix so you can't use same password file on both platforms...




[This message has been edited by mr.maX (edited 12-12-2001).]

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 12-12-2001 12:32

ok, thank you guys!

max, i have made changes as you said and now i have these lines in my ht.access:

AuthUserFile c:/programme/apache group/apache/htdocs/ht.passwd
AuthName "the localhost"
AuthType Basic
require valid-user

but it still doesnt work. what im i doing wrong?



InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 12-12-2001 13:22

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 12-12-2001 14:19

i think that IUSER only exists when you have IIS installed, which i dont.

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 12-13-2001 02:08

GRUMBLE, you should put quotes around ht.passwd filename... Also, folder that you're trying to protect must have AllowOverride option (in httpd.conf) set to All or AuthConfig. Something like this:

<Directory "c:/programme/apache group/apache/htdocs">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>


GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 12-13-2001 12:18

thanks max!
it worked now!



« BackwardsOnwards »

Show Forum Drop Down Menu