Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 设置Jenkins DNS_Apache_Nginx_Jenkins - Fatal编程技术网

Apache 设置Jenkins DNS

Apache 设置Jenkins DNS,apache,nginx,jenkins,Apache,Nginx,Jenkins,我一直想让詹金斯加入我的副总裁。 我做了所有的事情,让它在ip:8080上工作。 我真正想做的是让它在ci.domain.com上运行,但我一直遇到麻烦 我在同一台机器上使用翼手龙,它在Nginx上运行 当我将域名指向ip时,我会被重定向到hub.domain.com上的翼手龙 我尝试在apache上设置Jenkins,并将翼手龙留在Nginx上,但没有成功 有没有办法让它发挥作用 干杯。我也有同样的问题,网站上的nginx congif似乎不太好用 试试这个: upstream jenkins

我一直想让詹金斯加入我的副总裁。 我做了所有的事情,让它在ip:8080上工作。 我真正想做的是让它在ci.domain.com上运行,但我一直遇到麻烦

我在同一台机器上使用翼手龙,它在Nginx上运行

当我将域名指向ip时,我会被重定向到hub.domain.com上的翼手龙

我尝试在apache上设置Jenkins,并将翼手龙留在Nginx上,但没有成功

有没有办法让它发挥作用


干杯。

我也有同样的问题,网站上的nginx congif似乎不太好用

试试这个:

upstream jenkins {
  server 127.0.0.1:8080 fail_timeout=0;
}

server {
  listen 80;
  server_name ci.domain.com;
  return 301 https://$host$request_uri;
}

server {
  listen 443 ssl;
  server_name ci.domain.com;

  #if you want sll
  #ssl_certificate put_path_here;
  #ssl_certificate_key put_path_here;

  location / {
    proxy_set_header        Host $host:$server_port;
    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_redirect http:// https://;
    proxy_pass              http://jenkins;
    # Required for new HTTP-based CLI
    proxy_http_version 1.1;
    proxy_request_buffering off;
    proxy_buffering off; # Required for HTTP-based CLI to work over SSL
    # workaround for https://issues.jenkins-ci.org/browse/JENKINS-45651
    add_header 'X-SSH-Endpoint' 'jenkins.domain.tld:50022' always;
  }
}

你能分享你的nginx配置吗?