Sponsor-Board.de
.htaccess .htpasswd Keine Abfrage

+- Sponsor-Board.de (https://www.sponsor-board.de)
+-- Forum: Community (/forumdisplay.php?fid=56)
+--- Forum: Hilfe (/forumdisplay.php?fid=102)
+---- Forum: Linux-Server (/forumdisplay.php?fid=105)
+---- Thema: .htaccess .htpasswd Keine Abfrage (/showthread.php?tid=62850)


.htaccess .htpasswd Keine Abfrage - MB.n - 21.03.2017 17:42

Hey Leute,

.htaccess liegt in /var/www/html/phpmyadmin/.htaccess

Code:
AuthType Basic
AuthName "Kein Zutritt!"
AuthUserFile /etc/apache2/.phpmyadmin.htpasswd
Require valid-user



.htpasswd liegt in /etc/apache2/.phpmyadmin.htpasswd

Code:
phpmyadmin:"HASH"



mod_rewrite ist an, Standard vHost sieht aus:

Code:
<VirtualHost *:80>

        ServerAdmin [email protected]
        ServerName srv01.domain.tld
        DocumentRoot /var/www/html

<Directory /var/www/html>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

RewriteEngine on
RewriteCond %{SERVER_NAME} =srv01.domain.tld
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet


SSL vHost sieht aus:

Code:
<IfModule mod_ssl.c>
<VirtualHost *:443>

        ServerAdmin [email protected]
        ServerName srv01.domain.tld
        DocumentRoot /var/www/html

<Directory /var/www/html>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>


        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

SSLCertificateFile /etc/letsencrypt/live/srv01.domain.tld/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/srv01.domain.tld/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet


phpmyadmin extra vHost sieht aus:

Code:
Alias /phpmyadmin "/var/www/html/phpmyadmin/"

<Directory /var/www/html/phpmyadmin/>
    Options Indexes FollowSymlinks
    DirectoryIndex index.php
    AllowOverride All

    <IfModule mod_dav.c>
        Dav off
    </IfModule>

    SetEnv HOME /var/www/html/phpmyadmin
    SetEnv HTTP_HOME /var/www/html/phpmyadmin

</Directory>



Rufe ich folgenden Link auf [Link: Registrierung erforderlich] wird kein Passwort abgefragt


RE: .htaccess .htpasswd Keine Abfrage - ls13game - 21.03.2017 20:19

Du musst die htaccess und die .htpasswd auf den selben Speicherort legen bei fragen wende dich an mich über PN oder hier über Skype Jonas.ziegler9


RE: .htaccess .htpasswd Keine Abfrage - MB.n - 22.03.2017 13:01

Seit wann müssen .htpasswd und .htaccess am selben Ort liegen?

Dafür ist doch die Definition:
AuthUserFile /etc/apache2/.phpmyadmin.htpasswd