急速にnginxを構築し、身分証明書の検査を行います。
1248 ワード
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
# upstream
upstream kibana_web {
server 10.0.200.105:5601 weight=1 max_fails=2 fail_timeout=30s;
}
sendfile on;
keepalive_timeout 65;
server {
listen 5601;
server_name localhost;
location / {
auth_basic "The Kibana Monitor Center";
auth_basic_user_file /usr/share/nginx/html/.htpasswd;
root html;
index index.html index.htm;
proxy_set_header Host $host;
proxy_pass http://kibana_web;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
そのうちauth_basic "The Kibana Monitor Center";
auth_basic_user_file /usr/share/nginx/html/.htpasswd;
proxy_pass
3.ユーザーを追加htpasswd -c /usr/share/nginx/html/.htpasswd xxx
httacwd命令がなければyum install httpd-tools
4.複数のユーザが必要であれば、各ユーザはポートを設定すればいいです。