Warum klappt bei mir htaccess Passwortschutz für Apache2.4.10 Webserver auf Debian Jessie nicht ?
Ich habe das Verzeichnis test hinter dem html Ordner zu Testzwecken erstellt ( /var/www/html/test ) .
Die Apache Configdatei mit
nano /etc/apache2/sites-enabled/000-default.conf
wie folgt modifiziert.
_____________________________________________________________________________________________________
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName http://www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
</Directory>
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
_____________________________________________________________________________________________________
Mit
htpasswd -c /var/www/html/test/.htpasswd michael
die .htpasswd Passwort Datei erzeugt sowie mit
nano /var/www/html/test/.htaccsee
_____________________________________________________________________________________________________
AuthType Basic
AuthName "Privater Bereich"
AuthUserFile /var/www/html/test/.htpasswd
Require valid-user
_____________________________________________________________________________________________________
die .htaccsee Datei.
Ich weiß das die .htpasswd Datei außerhalb von www liegen soll, aber der Einfachheitshalber habe ich
es erst mal so gemacht.
Das Problem ich komme ohne Passwortabfrage ins Verzeichnis.
Was mache ich falsch?
Liebe Grüße an die Community und allen ein frohes neues Jahr.
Vielen lieben Dank ! Ja Rechtschreibfehler. Jetzt wäre ich froh wenn ich mich dafür bedanken kann.
Ich mache das mal hier Allso nochmals vielen Dank für die schnelle und koreckte Hilfe
htaccess Passwortschutz für Apache2.4.1
htaccess Passwortschutz für Apache2.4.1
Zuletzt geändert von micky06 am 05.01.2017 21:56:07, insgesamt 1-mal geändert.
Re: htaccess Passwortschutz für Apache2.4.1
... und Webserver danach neu geladen?Die Apache Configdatei mit
nano /etc/apache2/sites-enabled/000-default.conf
wie folgt modifiziert.
.htaccsee statt .htaccess - (nur) Übertragungsfehler?nano /var/www/html/test/.htaccsee