溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

nginx基于SSL方式代理jenkins和kibana

發(fā)布時(shí)間:2020-07-12 14:09:01 來(lái)源:網(wǎng)絡(luò) 閱讀:218 作者:hanye韓也 欄目:系統(tǒng)運(yùn)維
server {
  server_name  hanye-jenkins.hanye.net;
  access_log  /data/wwwlogs/jenkins-web.access.log  ;
  error_log  /data/wwwlogs/jenkins-web.error.log;
  listen 443 ssl;

    ssl_certificate   /usr/local/nginx/conf/ssl/hanye.net.pem;
    ssl_certificate_key  /usr/local/nginx/conf/ssl/hanye.net.key;
    ssl_session_timeout 10m;
    ssl_buffer_size     64k;
    ssl_session_cache       shared:SSL:10m;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2 SSLv3;
    ssl_prefer_server_ciphers on;

  location / {
      proxy_pass http://127.0.0.1:8080;
      proxy_redirect     default;
      #proxy_http_version 1.1;

      proxy_set_header   Host              $host;
      proxy_set_header   X-Real-IP         $remote_addr;
      proxy_set_header   X-Forwarded-For   $proxy_add_x_forwarded_for;
      proxy_set_header   X-Forwarded-Proto $scheme;
      proxy_max_temp_file_size 0;

      #this is the maximum upload size
      client_max_body_size       10m;
      client_body_buffer_size    128k;

      proxy_connect_timeout      120;
      proxy_send_timeout         120;
      proxy_read_timeout         120;
      proxy_buffering            off;
      proxy_request_buffering    off; # Required for HTTP CLI commands in Jenkins > 2.54
      proxy_set_header Connection ""; # Clear for keepalive
   }
   location  /oss {
      expires 3d;
      rewrite /(.+)$ /$1 break;
      proxy_pass https://fangx.oss-cn-shenzhen.aliyuncs.com/fangx/source/ZPMOQ2xjSwmBvNB1scM7JYwAgqCJvueKYlWbjlsu.png;
   }
}
server {
    server_name  hanye-es.hanye.net;
    access_log  /data/wwwlogs/es-web.access.log  ;
    error_log  /data/wwwlogs/es-web.error.log;
    listen 443 ssl;
    auth_basic "Nginx";  
    auth_basic_user_file /usr/local/nginx/conf/passwd;
    autoindex on;
    ssl_certificate   /usr/local/nginx/conf/ssl/hanye.net.pem;
    ssl_certificate_key  /usr/local/nginx/conf/ssl/hanye.net.key;
    ssl_session_timeout 10m;
    ssl_buffer_size     64k;
    ssl_session_cache       shared:SSL:10m;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2 SSLv3;
    ssl_prefer_server_ciphers on;

  location / {
      proxy_pass http://10.0.109.17:5601;
      proxy_redirect     off;
      proxy_http_version 1.1;

      proxy_set_header   Host              $host;
      proxy_set_header   X-Real-IP         $remote_addr;
      proxy_set_header   X-Forwarded-For   $proxy_add_x_forwarded_for;
      proxy_set_header   X-Forwarded-Proto $scheme;
      proxy_max_temp_file_size 0;

      #this is the maximum upload size
      client_max_body_size       10m;
      client_body_buffer_size    128k;

      proxy_connect_timeout      120;
      proxy_send_timeout         120;
      proxy_read_timeout         120;
      proxy_buffering            off;
      proxy_request_buffering    off; # Required for HTTP CLI commands in Jenkins > 2.54
      proxy_set_header Connection ""; # Clear for keepalive
 }
}
向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI