Проблема с nginx и auth based (просит много раз ввод пароля)

Обсуждение настройки и работы сервисов, резервирования, сетевых настроек и вопросов безопасности ОС.

Модераторы: SLEDopit, Модераторы разделов

aliens
Сообщения: 495
Статус: нетрушный
ОС: Gentoo & CentOS 5.1

Проблема с nginx и auth based

Сообщение aliens »

Здравствуйте

Сделал Auth Basic для 1 папки сайта в nginx, при обращении к index.php (в этой папки) получаю 6 запросов авторизации (по 1 на каждую ссылку в head этого index.php). В конфигу satisy on стоит. В чем может быть проблема?
Конфиг вот:

Код: Выделить всё

server {
listen 92.241.168.10;
server_name [url=http://www.site.org]www.site.org[/url] site.org;
access_log /var/log/nginx/scene_access.log;
error_log /var/log/nginx/scene_error.log info;
location / {
satisfy any;
root /var/www/scene-network;
index index.php index.html;
}
location ~* ^.+\.(php)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/scene-network$fastcgi_script_name;
include fastcgi_params;
}
location /closed/ {
index index.php index.html;
satisfy any;
root /var/www/site;
auth_basic "closed site";
auth_basic_user_file /var/www/site/closed/.htpasswd;
}

}

В index.php такое в head:
<script type="text/javascript" src="scripts/prototype.js"> </script>
<script type="text/javascript" src="scripts/window.js"> </script>
<script type="text/javascript" src="scripts/desktop.js"> </script>
<link href="themes/style.css" rel="stylesheet" type="text/css">
<link href="themes/default.css" rel="stylesheet" type="text/css">
<link href="themes/alphacube.css" rel="stylesheet" type="text/css">
Спасибо сказали:
Аватара пользователя
Ufomen
Сообщения: 81
ОС: CentOS 5.3

Re: Проблема с nginx и auth based

Сообщение Ufomen »

aliens писал(а):
21.01.2010 00:48
Здравствуйте

Сделал Auth Basic для 1 папки сайта в nginx, при обращении к index.php (в этой папки) получаю 6 запросов авторизации (по 1 на каждую ссылку в head этого index.php). В конфигу satisy on стоит. В чем может быть проблема?
Конфиг вот:

Код: Выделить всё

server {
listen 92.241.168.10;
server_name [url=http://www.site.org]www.site.org[/url] site.org;
access_log /var/log/nginx/scene_access.log;
error_log /var/log/nginx/scene_error.log info;
location / {
satisfy any;
root /var/www/scene-network;
index index.php index.html;
}
location ~* ^.+\.(php)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/scene-network$fastcgi_script_name;
include fastcgi_params;
}
location /closed/ {
index index.php index.html;
satisfy any;
root /var/www/site;
auth_basic "closed site";
auth_basic_user_file /var/www/site/closed/.htpasswd;
}

}

В index.php такое в head:
<script type="text/javascript" src="scripts/prototype.js"> </script>
<script type="text/javascript" src="scripts/window.js"> </script>
<script type="text/javascript" src="scripts/desktop.js"> </script>
<link href="themes/style.css" rel="stylesheet" type="text/css">
<link href="themes/default.css" rel="stylesheet" type="text/css">
<link href="themes/alphacube.css" rel="stylesheet" type="text/css">




Есть предложение:
Попробуйте идти от простого к сложному, например по этому топику http://forum.seo-host.ru/index.php?topic=267.0
и понять когда оно начинает работать не так как нужно, а может и не начнет вовсе...
Спасибо сказали: