Merge pull request #576 from sxua/master
Need to replace If statement with try_files in nginx.conf
This commit is contained in:
commit
6af33483fc
|
@ -220,15 +220,11 @@ Edit /etc/nginx/nginx.conf. Add next code to **http** section:
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name mygitlab.com;
|
server_name mygitlab.com;
|
||||||
|
root /home/gitlab/gitlab/public;
|
||||||
|
try_files $uri $uri/index.html $uri.html @gitlab;
|
||||||
|
|
||||||
location / {
|
location @gitlab {
|
||||||
|
proxy_pass http://gitlab;
|
||||||
root /home/gitlab/gitlab/public;
|
|
||||||
|
|
||||||
if (!-f $request_filename) {
|
|
||||||
proxy_pass http://gitlab;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue