/images/avatar.jpg

木木飞

怎样让nginx的配置支持https

server { listen 80; server_name api.dev.com; error_page 500 502 503 504 /50x.html; error_log /data/nginx/api.dev.com/error.log; access_log /data/nginx/api.dev.com/access_$logdate.log; #root /mnt/d/wsl/www/playsmart/; index index.html index.htm index.php; location = / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_http_version 1.1; proxy_set_header Connection keep-alive; proxy_cookie_path / "/; secure; HttpOnly; SameSite=strict"; proxy_pass http://127.0.0.1:8080; } location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_http_version 1.1; proxy_set_header Connection keep-alive; proxy_cookie_path / "/; secure;

Centos8搭建gitlab和gitlab-Runner

docker-compose.yml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 version:'3'services:gitlab.abc.com:container_name:gitlab.abc.comimage:gitlab/gitlab-ce:latest# image: gitlab/gitlab-ce:11.0.1-ce.0restart:alwaysprivileged:trueenvironment:GITLAB_OMNIBUS_CONFIG:|external_url 'https://gitlab.abc.com' gitlab_rails['time_zone'] = 'Asia/Shanghai' nginx['enable'] = false prometheus_monitoring['enable'] = false gitlab_workhorse['listen_network'] = "tcp" gitlab_workhorse['listen_addr'] = ":19900" gitlab_rails['gitlab_shell_ssh_port'] = 19901ports:- "19900:19900"- "19901:22"- "19091:9090"volumes:- "./ssl:/etc/gitlab/ssl"- "/data/gitlab.abc.com/config:/etc/gitlab:rw"- "/data/gitlab.abc.com/logs:/var/log/gitlab:rw"- "/data/gitlab.abc.com/data:/var/opt/gitlab:rw"- "/data/gitlab.abc.com/backups:/var/opt/gitlab/backups:rw"gitlab-runner:restart:alwaysimage:gitlab/gitlab-runnerdepends_on:- gitlab.abc.comvolumes:- /data/gitlab/gitlab-runner/config:/etc/gitlab-runner:Z-