Forum

Gitlab + HTTPS (ngi...
 
Notifications
Clear all

Gitlab + HTTPS (nginx only)

   RSS

0
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

This topic was modified 6 dni temu 2 times by mrmucha
2 Answers
0
Topic starter

env: running gitlab.mydomain.com:88 and second nginx on mydomain.com

  1. touch /etc/ngnix/sites-enabled/myGitlab
  2. content of /etc/ngnix/sites-enabled/myGitlab
    server {  
    	listen 80;
    	servername gitlab.mydomain.com
    
    	location / {
    		proxy_pass  http://gitlab.mydomain.com:88 
    	}
    }
  3. then type:
    certbot --nginx
  4. install certificate for gitlab.mydomain.com
  5. edit nano /etc/gitlab/gitlab.rb
  6. set external_url to gitlab:mydomain.com without port
    external_url 'http://gitlab.mydomain.com'
  7. set nginx['listen_port'] to 88
    nginx['listen_port'] = 88
  8. then type gitlab-ctl reconfigure
  9. then type gitlab-ctl restart nginx
  10. https://gitlab.mydomain.com is now working :)
  11. ekhem, dont forget about runners regression (read below)

 

This post was modified 6 dni temu by mrmucha
This post was modified 3 dni temu by mrmucha
0
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
  1. edit /etc/gitlab-runner/config.toml
  2. change url= to  https://gitlab.mydomain.com
  3. add clone_url= and set http://giblat.mydomain.com:88  
  4. verify token

 

Odpowiedź

Author Name

Author Email

Your question *

 
Preview 0 Revisions Saved
Share: