Notifications
Clear all
BugOverflow
2
Posty
1
Users
0
Reactions
494
Widok
0
20/06/2022 11:01 am
Topic starter
how to use https when gitlab is using different port for gitlab http://mygitlab.local:88
env: gitlab nginx + secondary nginx for my websites
2 Answers
0
20/06/2022 11:08 am
Topic starter
env: running gitlab.mydomain.com:88 and second nginx on mydomain.com
- touch /etc/ngnix/sites-enabled/myGitlab
- content of /etc/ngnix/sites-enabled/myGitlab
server { listen 80; servername gitlab.mydomain.com location / { proxy_pass http://gitlab.mydomain.com:88 } }
- then type:
certbot --nginx
- install certificate for gitlab.mydomain.com
- edit nano /etc/gitlab/gitlab.rb
- set external_url to gitlab:mydomain.com without port
external_url 'http://gitlab.mydomain.com'
- set nginx['listen_port'] to 88
nginx['listen_port'] = 88
- then type gitlab-ctl reconfigure
- then type gitlab-ctl restart nginx
- https://gitlab.mydomain.com is now working :)
- ekhem, dont forget about runners regression (read below)
- ekhem 2, dont forget about SPF record! (must be sepearted for each domain). Example for/etc/bind/zones/mydomain.file
@ IN TXT "v=spf1 a mx include:_spf.google.com ~all" gitlab IN TXT "v=spf1 a mx include:_spf.google.com ~all"
0
20/06/2022 11:42 pm
Topic starter
RUNNERS!
this config may break all your runners.
example errors
api/v4/jobs/request: 404 Not Found api/v4/runners/verify: 401 Unauthorized
- edit /etc/gitlab-runner/config.toml
- change url= to https://gitlab.mydomain.com
- add clone_url= and set http://giblat.mydomain.com:88
- verify token