+ Antworten
Ergebnis 1 bis 5 von 5

Thema: Neue .htaccess Datei- Server Error 505

  1. #1
    Neu an Board
    Registriert seit
    07.07.2009
    Beiträge
    2
    Bedankte sich
    0
    Erhielt 0 Danksagungen
    in 0 Beiträgen

    Standard Neue .htaccess Datei- Server Error 505

    Hallo,
    ich habe versucht folgende .htacess Datei zu benutzen, um meine Homepage Sicherheit zu erhöhen.

    Code:
    ### www.joomla-security.de # Version: 6 (2011-04-08)  ###
    #########################################################
    
    #################################################
    ##### ADDITIONAL SECURITY FUNCTIONS - START #####
    #################################################
    ##### Source: http://perishablepress.com/press/2009/03/16/the-perishable-press-4g-blacklist/
    
    ### PERISHABLE PRESS 4G BLACKLIST ###
    
    ### ESSENTIALS
    RewriteEngine On
    ServerSignature Off
    Options All -Indexes
    Options +FollowSymLinks
    
    ### FILTER REQUEST METHODS
    RewriteCond %{REQUEST_METHOD} ^(TRACE|DELETE|TRACK) [NC]
    RewriteRule ^(.*)$ - [R=404,L]
    
    ### BLOCK SOME USER AGENTS
    RewriteCond %{HTTP_USER_AGENT} ^Java|HTTrack|Baiduspider|CligooRobot|TrackBack|Jakarta|libwww-perl|Wget
    RewriteRule ^(.*)$ - [R=404,L]
    
    ### QUERY STRING EXPLOITS
    RewriteCond %{QUERY_STRING} \.\.\/ [NC,OR]
    RewriteCond %{QUERY_STRING} boot\.ini [NC,OR]
    RewriteCond %{QUERY_STRING} tag\= [NC,OR]
    RewriteCond %{QUERY_STRING} ftp\: [NC,OR]
    RewriteCond %{QUERY_STRING} https\: [NC,OR]
    RewriteCond %{QUERY_STRING} mosConfig [NC,OR]
    RewriteCond %{QUERY_STRING} ^.*(%0|127\.0).* [NC,OR]
    RewriteCond %{QUERY_STRING} ^.*(\(|\)|<|>|'|"|\?|\*|%%|&%%|&"|").* [NC,OR]
    RewriteCond %{QUERY_STRING} ^.*(globals|encode|localhost|loopback).* [NC,OR]
    RewriteCond %{QUERY_STRING} ^.*(select|insert|union|declare|drop).* [NC]
    RewriteRule ^(.*)$ - [R=404,L]
    
    ### CHARACTER STRINGS
    <IfModule mod_alias.c>
     ### BASIC CHARACTERS
     RedirectMatch 404 \:
     RedirectMatch 404 \@
     RedirectMatch 404 \[
     RedirectMatch 404 \]
     RedirectMatch 404 \^
     RedirectMatch 404 \`
     RedirectMatch 404 \{
     RedirectMatch 404 \}
     RedirectMatch 404 \~
     RedirectMatch 404 \"
     RedirectMatch 404 \$
     RedirectMatch 404 \<
     RedirectMatch 404 \>
     RedirectMatch 404 \|
     RedirectMatch 404 \.\.
     ### Uncomment the next line for BreezingForms use (may not work properly)
     RedirectMatch 404 \/\/
     RedirectMatch 404 \%0
     RedirectMatch 404 \%22
     RedirectMatch 404 \%27
     RedirectMatch 404 \%28
     RedirectMatch 404 \%29
     RedirectMatch 404 \%3C
     RedirectMatch 404 \%3E
     RedirectMatch 404 \%3F
     RedirectMatch 404 \%5B
     RedirectMatch 404 \%5C
     RedirectMatch 404 \%5D
     RedirectMatch 404 \%7B
     RedirectMatch 404 \%7C
     RedirectMatch 404 \%7D
     
     ### COMMON PATTERNS
     RedirectMatch 404 \_vpi
     RedirectMatch 404 \.inc
     RedirectMatch 404 xAou6
     RedirectMatch 404 db\_name
     RedirectMatch 404 select\(
     RedirectMatch 404 convert\(
     RedirectMatch 404 \/query\/
     RedirectMatch 404 ImpEvData
     RedirectMatch 404 \.XMLHTTP
     RedirectMatch 404 proxydeny
     RedirectMatch 404 function\.
     RedirectMatch 404 remoteFile
     RedirectMatch 404 servername
     RedirectMatch 404 \&rptmode\=
     RedirectMatch 404 sys\_cpanel
     RedirectMatch 404 db\_connect
     RedirectMatch 404 doeditconfig
     RedirectMatch 404 check\_proxy
     RedirectMatch 404 system\_user
     RedirectMatch 404 \/\(null\)\/
     RedirectMatch 404 clientrequest
     RedirectMatch 404 option\_value
     RedirectMatch 404 ref\.outcontrol
     
     ### SPECIFIC EXPLOITS
     RedirectMatch 404 errors\.
     RedirectMatch 404 include\.
     RedirectMatch 404 display\.
     RedirectMatch 404 password\.
     RedirectMatch 404 maincore\.
     RedirectMatch 404 authorize\.
     RedirectMatch 404 macromates\.
     RedirectMatch 404 head\_auth\.
     RedirectMatch 404 submit\_links\.
     RedirectMatch 404 change\_action\.
     ### Uncomment the next line for BreezingForms use (may not work properly)
     RedirectMatch 404 com\_facileforms\/
     RedirectMatch 404 admin\_db\_utilities\.
     RedirectMatch 404 admin\.webring\.docs\.
     RedirectMatch 404 Table\/Latest\/index\.
    </IfModule>
    
    ###############################################
    ##### ADDITIONAL SECURITY FUNCTIONS - END #####
    ###############################################
    
    #########################################################
    ##### ADDITIONAL JOOMLA! SECURITY FUNCTIONS - START #####
    #########################################################
    
    ########## Begin - Rule to block "?tp=1"
    RewriteCond %{QUERY_STRING} tp=(.*)
    RewriteRule ^(.*)$ index.php [F,L]
    ########## End - Rule to block "?tp=1"
    
    ########## Begin - Rule to block "?template"
    RewriteCond %{QUERY_STRING} template=(.*)
    RewriteRule ^(.*)$ index.php [F,L]
    ########## End - Rule to block "?template"
    
    
    ########## Begin - Rewrite rules to block out some common exploits
    ## If you experience problems on your site block out the operations listed below
    ## This attempts to block the most common type of exploit `attempts` to Joomla!
    #
    ## Deny access to extension xml files (uncomment out to activate)
    #<Files ~ "\.xml$">
    #Order allow,deny
    #Deny from all
    #Satisfy all
    #</Files>
    ## End of deny access to extension xml files
    # Block out any script trying to set a mosConfig value through the URL
    RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
    # Block out any script trying to base64_encode data within the URL
    RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
    # Block out any script that includes a ********** tag in URL
    RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
    # Block out any script trying to set a PHP GLOBALS variable via URL
    RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
    # Block out any script trying to modify a _REQUEST variable via URL
    RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
    # Return 403 Forbidden header and show the content of the root homepage
    RewriteRule .* index.php [F]
    #
    ########## End - Rewrite rules to block out some common exploits
    
    ########## Begin - Deny access to some files
    <Files .htaccess>
     Order Deny,Allow
     Deny from all
    </Files>
    
    <Files configuration.php>
     Order Deny,Allow
     Deny from all
    </Files>
    ########## End - Deny access to some files
    
    #######################################################
    ##### ADDITIONAL JOOMLA! SECURITY FUNCTIONS - End #####
    #######################################################
    
    ##############################################
    ##### ADDITIONAL CACHE FUNCTIONS - START #####
    ##############################################
    
    ### Compress the output with gzip
    AddOutputFilterByType deflate text/html text/plain text/css text/javascript application/javascript application/x-javascript application/rss+xml
    
    ### Set the default character set
    AddDefaultCharset utf-8
    
    <IfModule mod_headers.c>
      <FilesMatch "\\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
        Header set Cache-Control "max-age=33135480, public"
      </FilesMatch>
      <FilesMatch "\\.(css|js)$">
        Header set Cache-Control "max-age=604800, public"
      </FilesMatch>
      <FilesMatch "\\.(xml|txt)$">
        Header set Cache-Control "max-age=216000, public, must-revalidate"
      </FilesMatch>
      <FilesMatch "\\.(html|htm|php)$">
        Header set Cache-Control "max-age=33135480, public"
      </FilesMatch>
    </IfModule>
    
    ############################################
    ##### ADDITIONAL CACHE FUNCTIONS - END #####
    ############################################
    
    #  Uncomment following line if your webserver's URL
    #  is not directly related to physical file paths.
    #  Update Your Joomla! Directory (just / for root)
    
    # RewriteBase /
    
    #############################################
    ##### CUSTOM HTACCESS FUNCTIONS - START #####
    #############################################
    
    ### Redirect from "domain.com" to "www.domain.com" (uncomment out to activate)
    #RewriteCond %{HTTP_HOST} ^([0-9a-z-]+)\.de$ [NC]
    #RewriteRule ^(.*)$ http://www.%1.de/$1 [R=301,L]
    
    ###########################################
    ##### CUSTOM HTACCESS FUNCTIONS - END #####
    ###########################################
    
    
    ########## Begin - Joomla! core SEF Section
    #
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    #
    # If the requested path and file is not /index.php and the request
    # has not already been internally rewritten to the index.php script
    RewriteCond %{REQUEST_URI} !^/index\.php
    # and the request is for root, or for an extensionless URL, or the
    # requested URL ends with one of the listed extensions
    RewriteCond %{REQUEST_URI} (/[^.]*|\.(php|html?|feed|pdf|raw))$ [NC]
    # and the requested path and file doesn't directly match a physical file
    RewriteCond %{REQUEST_FILENAME} !-f
    # and the requested path and file doesn't directly match a physical folder
    RewriteCond %{REQUEST_FILENAME} !-d
    # internally rewrite the request to the index.php script
    RewriteRule .* index.php [L]
    #
    ########## End - Joomla! core SEF Section
    
    ########## Begin - Error documents
    #
    ErrorDocument 401 "404 Not Found!
    ErrorDocument 403 "404 Not Found!
    ErrorDocument 404 "404 Not Found!
    ErrorDocument 500 "Internal Server Error!
    #
    ########## End - Error documents
    Nun wird meine Homepage aber nicht mehr geöffnet, sondern immer ein Error 500 angezeigt. Was ist das Problem? Kann mir jemand helfen? Danke

    Zu meinem System:
    Joomla aktuelle Version, Flashslideshow mit Zugriff auf einen Bilderordner, JoomSef zur verkürzung der Urls, sonst eigentlich nichts...
    Geändert von bonn (15.04.2011 um 10:43 Uhr) Grund: Fehler in der Überschrift! Error 500 nicht 505 ;)

  2. #2
    Gehört zum Inventar Avatar von albatros
    Registriert seit
    16.08.2006
    Beiträge
    7.840
    Bedankte sich
    1.118
    Erhielt 1.890 Danksagungen
    in 1.748 Beiträgen

    Standard

    Zitat Zitat von bonn Beitrag anzeigen
    Kann mir jemand helfen? D.
    Hi,

    hast Du schon mal bei www.joomla-security.de nachgefragt?

    hth

    albatros
    1.FAQ 2.SuFu 3.Google
    Hilfestellungen und Lösungen können nur im Forum von allen genutzt werden. Bitte keine Supportanfragen per PN!
    ...und setz mich auf mein achtel Lorbeerblatt und mache was ich will.

  3. #3
    Neu an Board
    Registriert seit
    07.07.2009
    Beiträge
    2
    Bedankte sich
    0
    Erhielt 0 Danksagungen
    in 0 Beiträgen

    Standard

    Nein, da die Seite leider keinen Support bietet...
    Daher dachte ich, ich wende mich mal hierher und hoffe, dass mir jemand helfen kann.
    Im übrigen ahbe ich es auch mit dieser .htaccess probiert http://akeeba.assembla.com/code/mast...s/htaccess.txt auch ein Error und kein Zugriff.
    Ich habe das dumpfe Gefühl, dass es irgendwas mit dem Joom Sef zu tun hat, diese Komponente hat nämlich eine eigene .htacces erstellt die jedoch aus Sicherheitsgünden unbrauchbar ist...
    Geändert von bonn (15.04.2011 um 11:23 Uhr)

  4. #4
    Gute Seele des Boards Avatar von keraM
    Registriert seit
    12.03.2006
    Ort
    Dresden
    Beiträge
    10.592
    Bedankte sich
    152
    Erhielt 2.558 Danksagungen
    in 2.360 Beiträgen

    Standard

    Grundsätzlich:
    * je Verzeichnis kann es nur eine Datei .htaccess geben
    * sie wirken immer rekursiv
    * weniger ist mehr

    Also deaktiviere erstmal JoomSef und verwende die Standard htaccess, die von Joomla im Joomlaroot mitgebracht wird.
    Wenn damit auf der ganzen Site SEO-Links funktionieren, guckst Du nach, welche Anweisungen zur Nutzung der htaccess von JoomSEF gegeben werden (rtfm).

    Wenn damit alles funktioniert, kannst Du Dir mal überlegen, welchen Sicherheitswert die htaccess von joomla-security für Dich hat, und welche Optionen daraus Du aus welchen Gründen auch gern hättest.
    Gruß keraM
    Joomla-FAQ: --> Klick!
    Support per PN: --> Klick!

  5. #5
    Moderator Avatar von flotte
    Registriert seit
    20.03.2005
    Ort
    Neustadt
    Beiträge
    5.301
    Bedankte sich
    66
    Erhielt 1.258 Danksagungen
    in 1.101 Beiträgen

    Standard

    Deaktiviere schrittweise die zusätzlichen Bereiche dieser .htaccess, damit Du rausfindet welche Befehle mit Deinem Server nicht kompatiblel sind. Da gibt es schon Dinge die da nicht hingehören, sondern ausschließlich vom Serveradministrator gesteuert werden sollte.
    Z.B. die "AddOutputFilterByType"-Zeile.

+ Antworten

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein