SuSe 10.0 - .htaccess / .htpasswd

syclabs

syclabs

Grünschnabel
Hallo zusammen

Ich habe folgende problematik. Ich habe ein SuSe Linux 10.0 mit Apache2 und diversen domains auf die selbe IP Adresse eingerichtet. Es läuft alles wunderbar doch wenn ich ein .htaccess + .htpasswd file erstelle um ein verzeichniss zu schützen kommt keine Passwortabfrage.

-------------------
default_server.conf |
------------------------------------------------------------------------
DocumentRoot "/srv/www/htdocs"
<Directory "/srv/www/htdocs">
AllowOverride None

Order allow,deny
Allow from all
</Directory>
Alias /icons/ "/usr/share/apache2/icons/"

<Directory "/usr/share/apache2/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"


<Directory "/srv/www/cgi-bin">
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
</Directory>


Include /etc/apache2/conf.d/*.conf


Include /etc/apache2/conf.d/apache2-manual?conf
ServerName mail
ServerAdmin **********
NameVirtualHost XXX.XXX.XXX.XX
------------------------------------------------------------------------

-------------------
httpd.conf |
------------------------------------------------------------------------
Include /etc/apache2/uid.conf
Include /etc/apache2/server-tuning.conf
ErrorLog /var/log/apache2/error_log
Include /etc/apache2/sysconfig.d/loadmodule.conf
Include /etc/apache2/listen.conf
Include /etc/apache2/mod_log_config.conf
Include /etc/apache2/sysconfig.d/global.conf
Include /etc/apache2/mod_status.conf
Include /etc/apache2/mod_info.conf
Include /etc/apache2/mod_usertrack.conf
Include /etc/apache2/mod_autoindex-defaults.conf
TypesConfig /etc/apache2/mime.types
DefaultType text/plain
Include /etc/apache2/mod_mime-defaults.conf
Include /etc/apache2/errors.conf
Include /etc/apache2/ssl-global.conf

<Directory />
Options None
AllowOverride None
Order deny,allow
Deny from all
</Directory>

AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>

DirectoryIndex index.html index.html.var

Include /etc/apache2/default-server.conf
Include /etc/apache2/sysconfig.d/include.conf

Include /etc/apache2/vhosts.d/*.conf
------------------------------------------------------------------------

------------------
yast2_vhosts.conf |
------------------------------------------------------------------------
<VirtualHost xxx.xxx.xxx.xxx>
ServerName xxx.xxx.xxx.xxx
DocumentRoot /srv/www/htdocs
ServerAdmin **********

<Directory "/srv/www/htdocs">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost xxx.xxx.xxx.xxx>
ServerName xxx.xxx.xxx.xxx
ServerAlias test1.de *.test1.de
DocumentRoot /srv/www/hosting/test1
ServerAdmin **********

<Directory "/srv/www/hosting/test1">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost xxx.xxx.xxx.xxx>
ServerName xxx.xxx.xxx.xxx
ServerAlias test2.de *.test2.de
DocumentRoot /srv/www/hosting/test2
ServerAdmin **********

<Directory "/srv/www/hosting/test2">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost xxx.xxx.xxx.xxx>
ServerName xxx.xxx.xxx.xxx
ServerAlias test3.de *.test3.de
DocumentRoot /srv/www/hosting/test3
ServerAdmin **********

<Directory "/srv/www/hosting/test3">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost xxx.xxx.xxx.xxx>
ServerName xxx.xxx.xxx.xxx
ServerAlias test4 *.test4.de
DocumentRoot /srv/www/hosting/test4
ServerAdmin **********

<Directory "/srv/www/hosting/test4">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
------------------------------------------------------------------------

----------
.htaccess |
------------------------------------------------------------------------
AuthUserFile /srv/www/htdocs/test/.htpasswd
AuthName "geschuetzter bereich"
AuthType Basic

<LIMIT GET POST>
require user kai
</LIMIT>



Hat jemand ne Idee ? (PS: ich weiss dass es sicherheits technisch nicht gedacht ist dass .htaccess und .htpasswd im selben verzeichniss liegen) ;)
 
Zuletzt bearbeitet:
Thx

Vielen Dank für die Hilfe. Wie du schon gesagt hast man sollte wissen was man konfiguriert 8)

Habe nur von "NONE" auf "ALL" umgestellt und jetzt klappts
 

Ähnliche Themen

Nginx als Reverse Proxy für Nextcloud und Emby

Probleme mit virtual hosts

Apache2 mod_proxy

Repository-Freigabe funktioniert nicht

Apache /var/www zu /home/ich/www wechseln

Zurück
Oben