nginxでBasic認証の設定
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
[[nginx]]
*概要 [#ud9f3089]
nginxの設定ファイルにBasic認証の記述例です。
*記述例 [#vd7416db]
# cd /var/www/html
# mkdir pw
# htpasswd -c .htpasswd hogehogeuser
パスワード 2回入力
# vi /etc/nginx/stie-enabled/inamuu.com.conf
location /phpMyAdmin {
alias /var/www/html/phpMyAdmin/;
auth_basic "This is Secret Aria";
auth_basic_user_file /var/www/html/pw/.htpa...
}
# service nginx configtest
# service nginx reload
終了行:
[[nginx]]
*概要 [#ud9f3089]
nginxの設定ファイルにBasic認証の記述例です。
*記述例 [#vd7416db]
# cd /var/www/html
# mkdir pw
# htpasswd -c .htpasswd hogehogeuser
パスワード 2回入力
# vi /etc/nginx/stie-enabled/inamuu.com.conf
location /phpMyAdmin {
alias /var/www/html/phpMyAdmin/;
auth_basic "This is Secret Aria";
auth_basic_user_file /var/www/html/pw/.htpa...
}
# service nginx configtest
# service nginx reload
ページ名: