VPS/vServer - virtual private server > vServer - HowTo's

(Apache2) htacces und httpd.conf

(1/1)

TuSFloo:
Hi,
habe auf meinem Server jetzt einen Webserver installiert.
Nun möchte ich ein Verzeichnis mit einem Passwort schützen, indem ich in den entsprechenden Ordner eine .htacces Datei ablege.
Leider weiß ich nicht was ich nun in meine httpd.conf eintragen muss damit er die Passwortabfrage aufruft.
Ihr würdet mir sehr helfen wenn ihr mir ein Muster für meine httpd.conf geben könntet.

Gruß Flo

uname:
Gibt es die httpd.conf noch ?

Also ich habe unter


--- Code: ---/etc/apache2/sites-available/domain
--- Ende Code ---

 
--- Code: ---<Directory /users/bla/www>                                                             
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all   
</Directory>   

--- Ende Code ---
das AllowOveride auf "All" gesetzt.

Der Rest ist Standard:

- .htpasswd generieren mit htpasswd

.htaccess:

--- Code: ---AuthUserFile /users/bla/www/blubb/.htpasswd
AuthName "Geschuetzter Bereich!"
AuthType Basic
Require valid-user

--- Ende Code ---

TuSFloo:
Vielen Dank, es hat funktioniert.
Ich habe den code einfach in meine httpd.conf kopiert.

--- Code: ---<Directory /users/bla/www>                                                             
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all   
</Directory>
--- Ende Code ---
Bei mir gibts diese Datei noch, habe Debian 4 32bit drauf.

Gruß Flo

uname:
Die Datei ist nichts für mich. Habe natürlich Debian 5.0 Lenny

httpd.conf

--- Code: ---# This is here for backwards compatability reasons and to support
#  installing 3rd party modules directly via apxs2, rather than
#  through the /etc/apache2/mods-{available,enabled} mechanism.
#
#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so

--- Ende Code ---

Navigation

[0] Themen-Index

Zur normalen Ansicht wechseln