环境阿里云ECS, centos7.3 2核4G,所有配置方式都是参考视频,
域名是 smniuhe.com,可以ping 通,有个疑问是可以配置子域名么,这边并不能ping 通 gitlab.smniuhe.com,gitlab-ctl restart 启动服务后,访问不了 gitlab.smniuhe.com 这个地址,老师需要查看我这边什么配置随时发信息
#将所有证书配置到gitlab文件中
[root@iZuf6iq8e7ya9v3ix71k0pZ ssl]# vim /etc/gitlab/gitlab.rb
external_url = 'https://gitlab.smniuhe.com'
nginx['redirect_http_to_https'] = true
# nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.smniuhe.com.crt"
# nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.smniuhe.com.key"
# nginx['ssl_dhparam'] = /etc/gitlab/ssl/dhparams.pem # Path to dhparams.pem, eg. /etc/gitlab/ssl/dhparams.pem
# 配置 nginx 转发
[root@iZuf6iq8e7ya9v3ix71k0pZ ssl]# vim /var/opt/gitlab/nginx/conf/gitlab-http.conf
server {
listen *:80;
server_name gitlab.smniuhe.com;
rewrite ^(.*)$ https://$host$1 permanent;
server_tokens off; ## Don't show the nginx version number, a security best practice
## Increase this if you want to upload large attachments
## Or if you want to accept large git objects over http
client_max_body_size 0;
vim /var/opt/gitlab/gitlab-rails/etc/gitlab.yml
#
# 1. GitLab app settings
# ==========================
## GitLab settings
gitlab:
## Web server settings (note: host is the FQDN, do not include http://)
host: 106.15.191.27
port: 80
https: false