WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Programmierung (http://www.wcm.at/forum/forumdisplay.php?f=17)
-   -   Zugang mit PW (http://www.wcm.at/forum/showthread.php?t=72181)

OnkelNero 03.10.2002 14:33

Zugang mit PW
 
Hallo
Ich möchte mit einer .htaceess datei den zugang auf einigen php seiten einschrenken nur leider weis ich nicht wie ich die einbaue.
Server ist Apache mit php und mysql. Und sol auch über das INet gehen und welche einstellungen mus ich wo machen das es geht die datei habe ich schon.
Danke in voraus schon mal für die Hilfe

rev.antun 03.10.2002 14:45

na da hama ja schon was...
 
gibts hier schon mal hab jetzt auch nicht gesucht, nix des do trotz

erstens brauchst sowas in der httpd.conf

<Directory "/directory/to/protect">
Order deny,allow
allow from all
AllowOverride AuthConfig
</Directory>


im directory dann so eine (oder aehnliche) .htaccess:

AuthUserFile /directory/to/protect/.htpasswd
#pfad zum .htpasswd file
AuthGroupFile /dev/null
# Gruppe is egal
AuthName StaffPages
# Anzeige im popup window
AuthType Basic
# Authentifizierungsart

#was darf der user (hier get/post)
<Limit GET POST>
require user tonei
</Limit>

und dann noch ein .htpasswd anlegen:

/usr/bin/htpasswd -c -f /directory/to/protect/.htpasswd user

(das legt ein neues .htpasswd an, weitere user hinzufuegen ohne dem
-c switch, siehe 'man htpasswd')


weitere examples (auch mit .htgroup Benutzung):

http://www.euronet.nl/~arnow/htpassw...mentation.html
http://www.uga.edu/help/access-restrict.html
http://www.calpoly.edu/~www/htaccess_setup.html


Alle Zeitangaben in WEZ +2. Es ist jetzt 11:54 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag