Centos下的jenkins配置【部署工具】

老子叫甜甜 提交于 2020-08-17 16:52:09
server {
    listen          80;       # Listen on port 80 for IPv4 requests
    server_name     www.yuming.com;
    access_log      /var/log/nginx/jenkins_access.log;
    error_log       /var/log/nginx/jenkins_error.log;

    location ~ ^/static/[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]\/(.*)$ {
        #E.g /static/12345678/css/something.css will become /css/something.css
        rewrite "^/static/[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]\/(.*)" /$1 last;
    }   

    location @jenkins {
    sendfile off;
    proxy_pass         http://127.0.0.1:8080;
    proxy_redirect     off;

    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_max_temp_file_size 0;
    client_max_body_size       10m;
    client_body_buffer_size    128k;

    proxy_connect_timeout      90; 
    proxy_send_timeout         90; 
    proxy_read_timeout         90; 

    proxy_buffer_size          4k; 
    proxy_buffers              4 32k;
    proxy_busy_buffers_size    64k;
    proxy_temp_file_write_size 64k;
    }   

    location / { 
        root            /var/cache/jenkins/war/;
        try_files $uri @jenkins;
    }   
}

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!