diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-03-17 18:53:43 +0100 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-03-17 18:53:43 +0100 |
commit | d123b8ad5dcaf071ebd193694ba256d92203633b (patch) | |
tree | 1801fbc3aab997bea3f27824a3f4a675f6fb93a8 /lib | |
parent | d1fd2cb8c1cad5299555c3e9cff54e1d8cde44c0 (diff) | |
parent | 8fa2469bebf814a821da7883addc7c6c37e4a704 (diff) | |
download | gitlab-ce-d123b8ad5dcaf071ebd193694ba256d92203633b.tar.gz |
Merge branch 'artem-forks/gitlab-ce-nginx-rel-url'
Diffstat (limited to 'lib')
-rw-r--r-- | lib/support/nginx/gitlab | 11 | ||||
-rw-r--r-- | lib/support/nginx/gitlab-ssl | 10 |
2 files changed, 19 insertions, 2 deletions
diff --git a/lib/support/nginx/gitlab b/lib/support/nginx/gitlab index fc5475c4eef..1324e4cd267 100644 --- a/lib/support/nginx/gitlab +++ b/lib/support/nginx/gitlab @@ -30,7 +30,6 @@ server { listen [::]:80 default_server; server_name YOUR_SERVER_FQDN; ## Replace this with something like gitlab.example.com server_tokens off; ## Don't show the nginx version number, a security best practice - root /home/git/gitlab/public; ## See app/controllers/application_controller.rb for headers set @@ -57,4 +56,14 @@ server { proxy_pass http://gitlab-workhorse; } + + error_page 404 /404.html; + error_page 422 /422.html; + error_page 500 /500.html; + error_page 502 /502.html; + location ~ ^/(404|422|500|502)\.html$ { + root /home/git/gitlab/public; + internal; + } + } diff --git a/lib/support/nginx/gitlab-ssl b/lib/support/nginx/gitlab-ssl index 1e5f85413ec..af6ea9ed706 100644 --- a/lib/support/nginx/gitlab-ssl +++ b/lib/support/nginx/gitlab-ssl @@ -45,7 +45,6 @@ server { listen [::]:443 ipv6only=on ssl default_server; server_name YOUR_SERVER_FQDN; ## Replace this with something like gitlab.example.com server_tokens off; ## Don't show the nginx version number, a security best practice - root /home/git/gitlab/public; ## Strong SSL Security ## https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html & https://cipherli.st/ @@ -101,4 +100,13 @@ server { proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://gitlab-workhorse; } + + error_page 404 /404.html; + error_page 422 /422.html; + error_page 500 /500.html; + error_page 502 /502.html; + location ~ ^/(404|422|500|502)\.html$ { + root /home/git/gitlab/public; + internal; + } } |