21.03.2017, 17:42
Hey Leute,
.htaccess liegt in /var/www/html/phpmyadmin/.htaccess
.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