Commit 6af33483fc9050f4990a96495c95da3d94fdf364
Exists in
master
and in
4 other branches
Merge pull request #576 from sxua/master
Need to replace If statement with try_files in nginx.conf
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 | } | ... | ... |