Skip to content

Commit 77235c4

Browse files
authored
Merge pull request #3083 from sachilles/fix-nginx-config-17.8.x
Fix nginx configuration
2 parents eb88b39 + 01b037f commit 77235c4

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

assets/runtime/config/nginx/gitlab-pages-ssl

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ server {
2323
## Pages serving host
2424
server {
2525
listen 0.0.0.0:443 ssl;
26-
listen [::]:443 ssl http2;
26+
listen [::]:443 ssl;
27+
http2 on;
2728

2829
## Replace this with something like pages.gitlab.com
2930
server_name ~^.*{{GITLAB_PAGES_DOMAIN}};

assets/runtime/config/nginx/gitlab-registry

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ server {
1111
server_name {{GITLAB_REGISTRY_HOST}};
1212
server_tokens off; ## Don't show the nginx version number, a security best practice
1313
return 301 https://$http_host:$request_uri;
14-
access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log gitlab_access;
14+
access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log;
1515
error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_error.log;
1616
}
1717

1818
server {
1919
# If a different port is specified in https://gitlab.com/gitlab-org/gitlab-foss/blob/8-8-stable/config/gitlab.yml.example#L182,
2020
# it should be declared here as well
21-
listen *:{{GITLAB_REGISTRY_PORT}} ssl http2;
21+
listen *:{{GITLAB_REGISTRY_PORT}} ssl;
22+
http2 on;
2223
server_name {{GITLAB_REGISTRY_HOST}};
2324
server_tokens off; ## Don't show the nginx version number, a security best practice
2425

@@ -36,7 +37,7 @@ server {
3637
ssl_session_cache builtin:1000 shared:SSL:10m;
3738
ssl_session_timeout 5m;
3839

39-
access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log gitlab_access;
40+
access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_access.log;
4041
error_log {{GITLAB_LOG_DIR}}/nginx/gitlab_registry_error.log;
4142

4243
location / {

assets/runtime/config/nginx/gitlab-ssl

+3-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ server {
5555

5656
## HTTPS host
5757
server {
58-
listen 0.0.0.0:443 ssl http2;
59-
listen [::]:443 ipv6only=on ssl http2 default_server;
58+
listen 0.0.0.0:443 ssl;
59+
listen [::]:443 ipv6only=on ssl default_server;
60+
http2 on;
6061
server_name {{GITLAB_HOST}}; ## Replace this with something like gitlab.example.com
6162
server_tokens off; ## Don't show the nginx version number, a security best practice
6263

0 commit comments

Comments
 (0)