Bianca: Apache httpd.conf htaccess und htpasswd

Beitrag lesen

Hi Leute,

hab ein Problem mit der Konfiguration. Ich möchte meine Verzeichnisse schützen un bekomm immer wieder Internal Server Error
oder ich kann ohne Passwortabfrage direkt auf meine Verzeichnisse
zugreifen.
Bitte helft mir, und Sorry wegen dem vielen Code

Meine htaccess im Verzeichniss ddownload:
<Directory "/srv/www/htdocs/*/ddownload/index.htm">
 AuthType Basic
 AuthName "x-source.hopto.org_Download"
 AuthUserFile "/etc/httpd/.htpasswd"
 require valid-user
</Directory>

Meine htpasswd sieht folgender maßen aus (in httpd):
dieter:dieter
bianca:bianca

und meine httpd.conf (hier ohne geladene Module):
ServerType standalone
ServerRoot "/srv/www"
LockFile /var/lock/subsys/httpd/httpd.accept.lock
PidFile /var/run/httpd.pid
ScoreBoardFile /var/run/httpd.scoreboard
#ResourceConfig conf/srm.conf
#AccessConfig conf/access.conf
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150
MaxRequestsPerChild 0
Include /etc/httpd/suse_addmodule.conf
ExtendedStatus On
<IfModule mod_dav.c>
DavLockDB /var/lock/DAVLock
</IfModule>
<IfModule mod_include.c>
XBitHack on
</IfModule>

Section 2: 'Main' server configuration

Port 80
<IfDefine SSL>
Listen 80
Listen 443
</IfDefine>
User wwwrun
Group nogroup
ServerAdmin webmaster@x-source.hopto.org
ServerName x-source.hopto.org
DocumentRoot "/srv/www/htdocs"

<Directory />
    AuthUserFile  /etc/httpd/passwd
    AuthGroupFile /etc/httpd/group
    Options -FollowSymLinks +Multiviews
    AllowOverride None
</Directory>

<Directory "/srv/www/htdocs">
    Options Indexes -FollowSymLinks +Includes MultiViews
    AllowOverride AuthConfig
    Order allow,deny
    Allow from all
 <IfModule mod_dav.c>
  DAV Off
 </IfModule>

<Files /srv/www/htdocs/index.htm*>
  Options -FollowSymLinks +Includes +MultiViews
 </Files>

<Files /src/www/htdocs/ddownload/index.htm*>
  Options -FollowSymLinks +Multiviews
  AllowOverride AuthConfig
  AuthAuthoritative on
  order deny,allow
  deny from all
  allow from localhost
 </Files>

<Files test.php3>
  Order deny,allow
  deny from all
  allow from localhost
 </Files>
</Directory>
<IfModule mod_dir.c>
    DirectoryIndex index.html index.htm
</IfModule>
AccessFileName .htaccess
<Files ~ "^.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</Files>
#CacheNegotiatedDocs
UseCanonicalName On
<IfModule mod_mime.c>
    TypesConfig /etc/httpd/mime.types
</IfModule>
DefaultType text/plain
<IfModule mod_mime_magic.c>
    MIMEMagicFile /etc/httpd/magic
</IfModule>
HostnameLookups Off
ErrorLog /var/log/httpd/error_log
LogLevel warn
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
LogFormat "%h %l %u %t "%r" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /var/log/httpd/access_log common
ServerSignature On
<IfModule mod_alias.c>
    Alias /icons/ "/srv/www/icons/"
    <Directory "/srv/www/icons">
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

Alias /ddownload/ "/srv/www/htdocs/ddownload/"
    <Directory "/srv/www/htdocs/ddownload">
        Options -FollowSymLinks +Multiviews
        AllowOverride AuthConfig
        Order allow,deny
        Allow from all
    </Directory>

Alias /manual/ "/srv/www/htdocs/manual/"
    <Directory "/srv/www/htdocs/manual">
        Options Indexes FollowSymlinks MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
    <IfModule mod_perl.c>
        # Provide two aliases to the same cgi-bin directory,
        # to see the effects of the 2 different mod_perl modes.
        # for Apache::Registry Mode
        ScriptAlias /perl/          "/srv/www/cgi-bin/"
        # for Apache::Perlrun Mode
        ScriptAlias /cgi-perl/      "/srv/www/cgi-bin/"
    </IfModule>
    <Directory "/srv/www/cgi-bin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    </Directory>
</IfModule>

set /cgi-bin for CGI execution

<Location /cgi-bin>
 AllowOverride None
 Options +ExecCGI -Includes
 SetHandler cgi-script
</Location>
<IfModule mod_perl.c>
 Perlrequire /usr/include/apache/modules/perl/startup.perl
 PerlModule Apache::Registry
 <Location /perl>
  SetHandler  perl-script
  PerlHandler Apache::Registry
  Options ExecCGI
  PerlSendHeader On
 </Location>
 <Location /cgi-perl>
  SetHandler  perl-script
  PerlHandler Apache::PerlRun
  Options ExecCGI
  PerlSendHeader On
 </Location>
</IfModule>
<IfModule mod_setenvif.c>
    BrowserMatch "Mozilla/2" nokeepalive
    BrowserMatch "MSIE 4.0b2;" nokeepalive downgrade-1.0 force-response-1.0
    BrowserMatch "RealPlayer 4.0" force-response-1.0
    BrowserMatch "Java/1.0" force-response-1.0
    BrowserMatch "JDK/1.0" force-response-1.0
</IfModule>

/etc/sysconfig/apache.

<IfDefine STATUS>
 <Location /server-status>
      SetHandler server-status
      Order deny,allow
      Deny from all
      Allow from localhost
 </Location>
 <Location /server-info>
      SetHandler server-info
      Order deny,allow
      Deny from all
      Allow from localhost
 </Location>
 # enable perl-status for mod_perl
 <IfModule mod_perl.c>
  <Location /perl-status>
       SetHandler perl-script
       PerlHandler Apache::Status
       order deny,allow
       deny from all
       allow from localhost
  </Location>
 </IfModule>
</IfDefine>
<IfDefine SSL>
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl
</IfDefine>
<IfModule mod_ssl.c>
 SSLPassPhraseDialog  builtin
 #SSLSessionCache        none
 #SSLSessionCache        shmht:/var/run/ssl_scache(512000)
 #SSLSessionCache        shmcb:/var/run/ssl_scache(512000)
 SSLSessionCache         dbm:/var/run/ssl_scache
 SSLSessionCacheTimeout  300
 SSLMutex  file:/var/run/ssl_mutex
 SSLRandomSeed startup builtin
 SSLRandomSeed connect builtin
 #SSLRandomSeed startup file:/dev/random  512
 #SSLRandomSeed startup file:/dev/urandom 512
 #SSLRandomSeed connect file:/dev/random  512
 #SSLRandomSeed connect file:/dev/urandom 512
 SSLLog      /var/log/httpd/ssl_engine_log
 SSLLogLevel info
</IfModule>
<IfDefine SSL>

SSL Virtual Host Context

<VirtualHost _default_:443>
DocumentRoot "/srv/www/htdocs"
ServerName new.host.name
ServerAdmin you@your.address
ErrorLog /var/log/httpd/error_log
TransferLog /var/log/httpd/access_log
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /etc/httpd/ssl.crt/server.crt
....
Wenn die Module wichtig sind bitte ich um einen kurzen Hinweis.
Ist sonst noch etwas zu beachten??? Muß für die PW abfrage ein Script geschrieben werden?

MfG Bianca