Skip to content

Instantly share code, notes, and snippets.

@smichaelsen
Created September 6, 2014 07:12
Show Gist options
  • Save smichaelsen/e2b3d801112cf120cba9 to your computer and use it in GitHub Desktop.
Save smichaelsen/e2b3d801112cf120cba9 to your computer and use it in GitHub Desktop.
Gitlab CI nginx settings
# GITLAB CI
# Maintainer: @randx
# App Version: 2.0
upstream gitlab_ci {
server unix:/home/gitlab_ci/gitlab-ci/tmp/sockets/gitlab-ci.socket;
}
server {
listen gitlab-ci.app-zap.de:443 ssl;
server_name gitlab-ci.app-zap.de;
ssl on;
ssl_certificate /home/private/ssl-gitlab/ssl-unified.crt;
ssl_certificate_key /home/private/ssl-gitlab/ssl.key;
server_tokens off;
root /home/gitlab_ci/gitlab-ci/public;
access_log /var/log/nginx/gitlab_ci_access.log;
error_log /var/log/nginx/gitlab_ci_error.log;
location / {
try_files $uri $uri/index.html $uri.html @gitlab_ci;
}
location @gitlab_ci {
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_redirect off;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://gitlab_ci;
}
# adjust this to match the largest build log your runners might submit,
# set to 0 to disable limit
client_max_body_size 10m;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment