IMHO.WS

IMHO.WS (https://www.imho.ws/index.php)
-   Пингвинятник (ОС *NIX) (https://www.imho.ws/forumdisplay.php?f=76)
-   -   Apache .htaccess problem (https://www.imho.ws/showthread.php?t=79153)

f1vlad 05.02.2005 02:47

Apache .htaccess problem
 
Может кто-то поможет... парюсь с АПАЧЕ, нужно сделать так, что бы на одну директорию сайт спрашивал пароль, но что бы разрешал свободный вход для ЛОКАЛ ХОСТ т.е. 127.0.0.1

вот что я прописываю в .htaccess:

Код:

AuthUserFile /usr/home/eloi/htpasswd
AuthName "Password Protected Area"
AuthType Basic
< Limit GET POST>
order deny,allow
deny from all
allow from 127.0.0.1
require testuser
< /Limit>

Как только добавляю "deny" или "allow" сервер говорит что "Internal Server Error". в логе vвот что пишется:


Код:

[Fri Feb 04 18:00:49 2005] [alert] [client 209.113.188.78] /var/www/html/daremightythings/intranet/.htaccess: deny not allowed here
[Fri Feb 04 18:00:55 2005] [alert] [client 209.113.188.78] /var/www/html/daremightythings/intranet/.htaccess: deny not allowed here
[Fri Feb 04 18:01:15 2005] [alert] [client 209.113.188.78] /var/www/html/daremightythings/intranet/.htaccess: allow not allowed here

шо делать



http://preview.ngycp.org/_discussion...es/36_2_51.gif

noname 06.02.2005 10:31

a кто укажет
PHP код:

<directory> .... </directory

??

что-то вроде этого

PHP код:

<Directory /var/www/download>
        
AuthName "Examples of Access Control"
        
AuthType basic
        AuthUserFile 
/home/san/local_pass
        
Require valid-user 
</Directory


AndreyKa 06.02.2005 16:09

Укажи локацию к чему ты делаешь allow/deny.

Zueuk 06.02.2005 19:49

Если под локацией ты понимаешь папку, то это /var/www/download.

f1vlad 06.02.2005 22:45

tak eto zhe .htaccess, a lokatsia i est ta direktoria v kotorij .htaccess nahoditsa, tak mne kazhetsa. Pomoemy apache nepravilno sconfigurirovan, ya eche s nim "poigraius"...


Часовой пояс GMT +4, время: 18:47.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.