From: Vladimir Lettiev <crux@syktsu.ru>
To: community@altlinux.ru
Subject: Re: [Comm] apache & nagios
Date: Mon, 03 May 2004 21:54:32 +0400
Message-ID: <40968758.1000803@syktsu.ru> (raw)
In-Reply-To: <40967ECA.7030105@iop.kiev.ua>
Andrey Rybak пишет:
> Во FreeBSD это делается с помощью размещения соответствующего файла
> .htaccess в нужной директории и команды tpasswd.
> Хотя апач у меня проинсталлирован и запущен, вышеуказанная команда не
> работает.
> А вот и вопрос - какая в АЛТ-линуксовском апаче команда(скрипт, прога)
> является аналогом tpasswd. Как создать авторизованного пользователя?
>
> Заранее спасибо.
хм... apache он и в африке apache...
htpasswd это стандартная утилита для создания файла паролей, для доступа
к каталогам/файлам внутри дерева каталогов веб-сервера.
Вот небольшой пример использования:
1. Создаётся файл .htaccess в директории, к которой мы хотим запоролить
доступ, вот примерно с таким содержимым:
AuthName "protected zone"
AuthType Basic
AuthUserFile /path_to_pass_file/.htpasswd
require valid-user
2. Создаём файл паролей /path_to_pass_file/.htpasswd :
$ htpasswd -c -b /path_to_pass_file/.htpasswd username password
при последующем добавлении пользователей (смене их пароля) опускается
параметр '-c'.
файл паролей может находится в том же каталоге, где и .htaccess. По
умолчанию apache не будет отдавать веб-клиенту файлы, начинающиеся с ".ht"
3. Проверяем, что в httpd.conf установлена директива "AuthConfig" на
парсинг .htaccess файлов. Примерно такая запись:
<Directory "/var/www/html">
....
AllowOverride AuthConfig
....
</Directory>
Вот собственно и всё. Добавлю только, что некоторые веб-мастеры
запрещают парсинг (AuthConfig), считая, что это замедляет работу apache
и выставляют директивы доступа непосредственно в httpd.conf. Возможно
они правы, но думаю вряд ли это повод отказываться от удобного и гибкого
механизма настроек...
--
С уважением, Владимир Леттиев aka crux <crux@syktsu.ru>
next prev parent reply other threads:[~2004-05-03 17:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-03 17:18 Andrey Rybak
2004-05-03 17:54 ` Vladimir Lettiev [this message]
2004-05-03 19:42 ` [Comm] " Michael Shigorin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40968758.1000803@syktsu.ru \
--to=crux@syktsu.ru \
--cc=community@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git