Website htaccess

  • Hallo,


    ist es immer noch so, dass man die apache.conf anpassen muss, wenn man eine Seite per htaccess absichern möchte?
    Oder kann man dieses jetzt mittlerweile irgendwo im Webinterface aktivieren?


    Grüße
    Ic3mAn


    Hier einmal der Vergleich meiner beiden apache.conf. Auf meinem alten NAS funktionierte die htaccess Datei. Auf dem Neuen nicht. Soll ich nun einfach die Konfiguration anpassen?


    TS-509 Pro

    C
    #ServerType standaloneServerRoot "/usr/local/apache"LockFile /var/lock/apache.lockPidFile /var/lock/apache.pid#ScoreBoardFile /usr/local/apache/logs/apache.scoreboardTimeout 300KeepAlive OnMaxKeepAliveRequests 100KeepAliveTimeout 15ServerLimit 4StartServers 3MaxClients 256MinSpareThreads 75MaxSpareThreads 250ThreadsPerChild 64MaxRequestsPerChild 1000Listen 80User httpdusrGroup administratorsServerAdmin admin@NAS#ServerName NASTraceEnable offServerTokens ProdDocumentRoot "/share/Qweb"<Directory />	Options FollowSymLinks	AllowOverride None	Order deny,allow	Deny from all</Directory><Directory "/share/Qweb">	Options FollowSymLinks MultiViews	AllowOverride All	Order allow,deny	Allow from all</Directory><IfModule dir_module>		DirectoryIndex index.html index.htm index.php</IfModule>AccessFileName .htaccess<FilesMatch "^\.ht">    Order allow,deny    Deny from all    Satisfy All</FilesMatch>UseCanonicalName OffHostnameLookups Off<Directory "/usr/local/apache/cgi-bin">    AllowOverride None    Options None    Order allow,deny    Allow from all</Directory>DefaultType text/plainErrorLog /dev/null## LogLevel: Control the number of messages logged to the error_log.# Possible values include: debug, info, notice, warn, error, crit,# alert, emerg.#LogLevel crit<IfModule log_config_module>    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    <IfModule logio_module>      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio    </IfModule>    #    # If you prefer a logfile with access, agent, and referer information    # (Combined Logfile Format) you can use the following directive.    #</IfModule>ServerSignature On## Aliases: Add here as many aliases as you need (with no limit). The format is # Alias fakename realname#<IfModule alias_module>		Alias /v3_menu/ "/home/httpd/v3_menu/"		<Directory "/home/httpd/v3_menu">				AllowOverride None				Order allow,deny				Allow from all		</Directory></IfModule><IfModule autoindex_module>		AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip		AddIconByType (TXT,/icons/text.gif) text/*		AddIconByType (IMG,/icons/image2.gif) image/*		AddIconByType (SND,/icons/sound2.gif) audio/*		AddIconByType (VID,/icons/movie.gif) video/*		AddIcon /icons/binary.gif .bin .exe		AddIcon /icons/binhex.gif .hqx		AddIcon /icons/tar.gif .tar		AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv		AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip		AddIcon /icons/a.gif .ps .ai .eps		AddIcon /icons/layout.gif .html .shtml .htm .pdf		AddIcon /icons/text.gif .txt		AddIcon /icons/c.gif .c		AddIcon /icons/p.gif .pl .py		AddIcon /icons/f.gif .for		AddIcon /icons/dvi.gif .dvi		AddIcon /icons/uuencoded.gif .uu		AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl		AddIcon /icons/tex.gif .tex		AddIcon /icons/bomb.gif core		AddIcon /icons/back.gif ..		AddIcon /icons/hand.right.gif README		AddIcon /icons/folder.gif ^^DIRECTORY^^		AddIcon /icons/blank.gif ^^BLANKICON^^		DefaultIcon /icons/unknown.gif		ReadmeName README.html		HeaderName HEADER.html		IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t</IfModule>## Document types.#<IfModule mime_module>		TypesConfig /etc/config/apache/mime.types		AddLanguage da .dk		AddLanguage nl .nl		AddLanguage en .en		AddLanguage et .ee		AddLanguage fr .fr		AddLanguage de .de		AddLanguage el .el		AddLanguage he .he		AddCharset ISO-8859-8 .iso8859-8		AddLanguage it .it		AddLanguage ja .ja		AddCharset ISO-2022-JP .jis		AddLanguage kr .kr		AddCharset ISO-2022-KR .iso-kr		AddLanguage nn .nn		AddLanguage no .no		AddLanguage pl .po		AddCharset ISO-8859-2 .iso-pl		AddLanguage pt .pt		AddLanguage pt-br .pt-br		AddLanguage ltz .lu		AddLanguage ca .ca		AddLanguage es .es		AddLanguage sv .sv		AddLanguage cs .cz .cs		AddLanguage ru .ru		AddLanguage zh-TW .zh-tw		AddCharset Big5				 .Big5		.big5		AddCharset WINDOWS-1251 .cp-1251		AddCharset CP866				.cp866		AddCharset ISO-8859-5   .iso-ru		AddCharset KOI8-R		   .koi8-r		AddCharset UCS-2				.ucs2		AddCharset UCS-4				.ucs4		AddCharset UTF-8				.utf8		<IfModule negotiation_module>				LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw		</IfModule>		AddType application/x-tar .tgz		AddEncoding x-compress .Z		AddEncoding x-gzip .gz .tgz		AddType application/x-compress .Z		AddType application/x-gzip .gz .tgz		AddType application/x-httpd-php .php .php4 .php3 .phtml		AddType application/x-httpd-php-source .phps		AddHandler cgi-script .cgi		AddType text/html .shtml		AddHandler server-parsed .shtml		AddHandler send-as-is asis		AddHandler imap-file map		AddHandler type-map var</IfModule><IfModule mime_magic_module>		MIMEMagicFile /etc/config/apache/magic</IfModule><IfModule setenvif_module>		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><IfModule ssl_module>	SSLRandomSeed startup builtin	SSLRandomSeed connect builtin</IfModule>LoadModule deflate_module modules/mod_deflate.so<IfModule mod_deflate.c>        DeflateCompressionLevel 2        AddOutputFilterByType DEFLATE text/html text/plain text/xml        AddOutputFilter DEFLATE js css        BrowserMatch ^Mozilla/4 gzip-only-text/html        BrowserMatch ^Mozilla/4\.[0678] no-gzip        BrowserMatch \bMSIE\s7  !no-gzip !gzip-only-text/html</IfModule>LoadModule reqtimeout_module modules/mod_reqtimeout.so<IfModule reqtimeout_module>	RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500</IfModule>Include /etc/config/apache/extra/apache-fastcgi.confInclude /etc/config/apache/extra/apache-msv2.confInclude /etc/config/apache/extra/apache-musicstation.confInclude /etc/config/apache/extra/apache-photo.confInclude /etc/config/apache/extra/apache-video.conf


    TVS-1282



    Keiner eine Idee?

  • und wie sieht dein script aus?


    so sieht das bei mir aus, musste den pfad änder der passwort datei und den link, falls einer ein falsches passwort eingibt


    Apache Configuration
    AuthUserFile /pfad/zur/.htpasswd 
    AuthGroupFile /dev/null
    AuthName "domain.de"
    AuthType Basic
    <Limit GET>
    require valid-user
    </Limit>
    ErrorDocument 401 "<script>window.location.href='https://hierumleiten';</script><noscript>Fehler 401 - Du hast keine Zugriffsrechte.</noscript>"
  • So sieht der Code aus. Eins zu eins vom alten NAS übernommen

    HTML
    AuthName "Exploration"
    AuthType Basic
    AuthUserFile "/share/Web/test/test.users"
    require valid-user
  • Nein, auch mit deiner Version habe ich keinen Erfolg.


    Code
    Internal Server Error
    
    
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    
    
    Please contact the server administrator at admin@NAS to inform them of the time this error occurred, and the actions you performed just before this error.
    
    
    More information about this error may be available in the server error log.