nginx配置jenkins二级域名,以及443 SSL访问
新增配置文件
server
{ listen 443;
#listen 80;
server_name jenkins.yanxizhu.com;
#error_page 404/404.html;
ssl_certificate /etc/nginx/conf.d/jenkins.yanxizhu.com_bundle.crt;
ssl_certificate_key /etc/nginx/conf.d/jenkins.yanxizhu.com.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
error_page 497 https://$host$request_uri;
#Location配置
location / {
proxy_set_header X-Rea $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Nginx-Proxy true;
proxy_pass http://xx.xxx.xx.xx:10240;
proxy_set_header X-Forwarded-Proto $scheme;
}
access_log /var/log/nginx/jenkins.yanxizhu.com.log;
}
server {
listen 80;
server_name jenkins.yanxizhu.com;
rewrite ^(.*) https://jenkins.yanxizhu.com$1 permanent;
}
注意:自己的端口以及ip地址和域名,以及域名解析配置、SSL证书名字根据自己的修改。
[...]docker run -d -p 8000:8000 --name app_docker app_docker:1.0 注意自己端口名称。6、访问测试通过自己xxx.xxx.xx.xx:8000/hello即可自己写的helloword了。以后每次改动代码,push提交到giee码云后会自动部署,不用手动点击部署。7、问题记录及解决方案比如:1、查不到mvn、docker、jdk命令,可能是jen[...]