Apache auth basic file

Aus xinux.net
Zur Navigation springen Zur Suche springen
  • htpasswd -c /etc/apache2/passwords xinux
  • htpasswd /etc/apache2/passwords thomas
<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                AuthType Basic
                AuthName "Restricted Area"
                AuthBasicProvider file
                AuthUserFile /etc/apache2/passwords
                require valid-user
        </Directory>
        ErrorLog ${APACHE_LOG_DIR}/error.log
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>