小编sdu*_*ude的帖子

使用 Nginx 作为反向代理的 Tomcat 应用程序 (JIRA) 的基本身份验证

我有几个运行 Atlassian Tomcat 应用程序的子域(jira.example.com、confluence.example.com、stash.example.com),我想知道是否可以basic_auth使用.htpasswd.

Nginx 在没有 basic_auth 指令的情况下工作正常,但是如果我尝试在nginx.conf...

user              nginx;
worker_processes  1;

error_log         /var/log/nginx/error.log;
pid               /var/run/nginx.pid;

events {
    worker_connections  1024;
}


http {

    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] $request '
                      '"$status" $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    # Load config files from the /etc/nginx/conf.d directory
    include /etc/nginx/conf.d/*.conf;

    # Our self-signed cert
    ssl_certificate     /etc/ssl/certs/fissl.crt;
    ssl_certificate_key /etc/ssl/private/fissl.key;

    # Password …
Run Code Online (Sandbox Code Playgroud)

tomcat nginx reverse-proxy confluence jira

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

confluence ×1

jira ×1

nginx ×1

reverse-proxy ×1

tomcat ×1