(Apache2) htacces und httpd.conf

Bitte loggen sie sich ein oder registrieren sie sich.

Einloggen mit Benutzername, Passwort und Sitzungslänge
Erweiterte Suche  

Autor Thema: (Apache2) htacces und httpd.conf  (Gelesen 3493 mal)

0 Mitglieder und 1 Gast betrachten dieses Thema.

TuSFloo

  • Grünschnabel
  • *
  • Offline Offline
  • Beiträge: 2
(Apache2) htacces und httpd.conf
« am: 16.April 2009, 21:42:00 »

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
Gespeichert


uname

  • Gast
Re: (Apache2) htacces und httpd.conf
« Antwort #1 am: 17.April 2009, 08:41:42 »

Gibt es die httpd.conf noch ?

Also ich habe unter

/etc/apache2/sites-available/domain
 <Directory /users/bla/www>                                                             
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all   
</Directory>   
das AllowOveride auf "All" gesetzt.

Der Rest ist Standard:

- .htpasswd generieren mit htpasswd

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

TuSFloo

  • Grünschnabel
  • *
  • Offline Offline
  • Beiträge: 2
Re: (Apache2) htacces und httpd.conf
« Antwort #2 am: 17.April 2009, 10:37:47 »

Vielen Dank, es hat funktioniert.
Ich habe den code einfach in meine httpd.conf kopiert.
<Directory /users/bla/www>                                                             
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all   
</Directory>
Bei mir gibts diese Datei noch, habe Debian 4 32bit drauf.

Gruß Flo
Gespeichert

uname

  • Gast
Re: (Apache2) htacces und httpd.conf
« Antwort #3 am: 17.April 2009, 13:52:54 »

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

httpd.conf
# 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
Gespeichert
 

Seite erstellt in 0.093 Sekunden mit 21 Abfragen.