Commit e6153beda8527c7246565ff7deae93c766d6d2cb
1 parent
039b6db4
Exists in
master
and in
4 other branches
replace if statement with try_files in nginx.conf
http://wiki.nginx.org/IfIsEvil
Showing
1 changed file
with
5 additions
and
9 deletions
Show diff stats
doc/installation.md
... | ... | @@ -220,15 +220,11 @@ Edit /etc/nginx/nginx.conf. Add next code to **http** section: |
220 | 220 | server { |
221 | 221 | listen 80; |
222 | 222 | server_name mygitlab.com; |
223 | - | |
224 | - location / { | |
225 | - | |
226 | - root /home/gitlab/gitlab/public; | |
227 | - | |
228 | - if (!-f $request_filename) { | |
229 | - proxy_pass http://gitlab; | |
230 | - break; | |
231 | - } | |
223 | + root /home/gitlab/gitlab/public; | |
224 | + try_files $uri $uri/index.html $uri.html @gitlab; | |
225 | + | |
226 | + location @gitlab { | |
227 | + proxy_pass http://gitlab; | |
232 | 228 | } |
233 | 229 | |
234 | 230 | } | ... | ... |