replace if statement with try_files in nginx.conf

http://wiki.nginx.org/IfIsEvil
This commit is contained in:
Olexandr Skrypnyk 2012-03-22 15:34:16 +02:00
parent 039b6db483
commit e6153beda8

View file

@ -220,15 +220,11 @@ Edit /etc/nginx/nginx.conf. Add next code to **http** section:
server {
listen 80;
server_name mygitlab.com;
root /home/gitlab/gitlab/public;
try_files $uri $uri/index.html $uri.html @gitlab;
location / {
root /home/gitlab/gitlab/public;
if (!-f $request_filename) {
proxy_pass http://gitlab;
break;
}
location @gitlab {
proxy_pass http://gitlab;
}
}