mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-25 14:08:09 +00:00
Fix nginx configuration
This commit is contained in:
parent
eb88b3902f
commit
01b037f8af
@ -23,7 +23,8 @@ server {
|
||||
## Pages serving host
|
||||
server {
|
||||
listen 0.0.0.0:443 ssl;
|
||||
listen [::]:443 ssl http2;
|
||||
listen [::]:443 ssl;
|
||||
http2 on;
|
||||
|
||||
## Replace this with something like pages.gitlab.com
|
||||
server_name ~^.*{{GITLAB_PAGES_DOMAIN}};
|
||||
|
||||
@ -11,14 +11,15 @@ server {
|
||||
server_name {{GITLAB_REGISTRY_HOST}};
|
||||
server_tokens off; ## Don't show the nginx version number, a security best practice
|
||||
return 301 https://$http_host:$request_uri;
|
||||
access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log gitlab_access;
|
||||
access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log;
|
||||
error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_error.log;
|
||||
}
|
||||
|
||||
server {
|
||||
# If a different port is specified in https://gitlab.com/gitlab-org/gitlab-foss/blob/8-8-stable/config/gitlab.yml.example#L182,
|
||||
# it should be declared here as well
|
||||
listen *:{{GITLAB_REGISTRY_PORT}} ssl http2;
|
||||
listen *:{{GITLAB_REGISTRY_PORT}} ssl;
|
||||
http2 on;
|
||||
server_name {{GITLAB_REGISTRY_HOST}};
|
||||
server_tokens off; ## Don't show the nginx version number, a security best practice
|
||||
|
||||
@ -36,7 +37,7 @@ server {
|
||||
ssl_session_cache builtin:1000 shared:SSL:10m;
|
||||
ssl_session_timeout 5m;
|
||||
|
||||
access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log gitlab_access;
|
||||
access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log;
|
||||
error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_error.log;
|
||||
|
||||
location / {
|
||||
|
||||
@ -55,8 +55,9 @@ server {
|
||||
|
||||
## HTTPS host
|
||||
server {
|
||||
listen 0.0.0.0:443 ssl http2;
|
||||
listen [::]:443 ipv6only=on ssl http2 default_server;
|
||||
listen 0.0.0.0:443 ssl;
|
||||
listen [::]:443 ipv6only=on ssl default_server;
|
||||
http2 on;
|
||||
server_name {{GITLAB_HOST}}; ## Replace this with something like gitlab.example.com
|
||||
server_tokens off; ## Don't show the nginx version number, a security best practice
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user