diff --git a/images/ui.Dockerfile b/images/ui.Dockerfile index 30f600ab52..dce2206217 100644 --- a/images/ui.Dockerfile +++ b/images/ui.Dockerfile @@ -24,5 +24,6 @@ USER nginx EXPOSE 8080 COPY ui/image/nginx.conf /etc/nginx/conf.d/default.conf +COPY ui/image/location.locations /etc/nginx/conf.d/location.locations CMD /usr/bin/start.sh diff --git a/ui/image/location.locations b/ui/image/location.locations new file mode 100644 index 0000000000..e2981db056 --- /dev/null +++ b/ui/image/location.locations @@ -0,0 +1,8 @@ +location / { + index index.html index.htm; + try_files $uri /index.html; +} + +error_page 500 502 503 504 /50x.html; +location = /50x.html { +} diff --git a/ui/image/nginx.conf b/ui/image/nginx.conf index 98e54811dc..dc0e928e57 100644 --- a/ui/image/nginx.conf +++ b/ui/image/nginx.conf @@ -1,24 +1,16 @@ server { listen 8080; server_name localhost; + root /usr/share/nginx/html; #charset koi8-r; #access_log /var/log/nginx/host.access.log main; - location / { - root /usr/share/nginx/html; - index index.html index.htm; - try_files $uri /index.html; - } + include /etc/nginx/conf.d/location.locations; #error_page 404 /404.html; # redirect server error pages to the static page /50x.html - # - error_page 500 502 503 504 /50x.html; - location = /50x.html { - root /usr/share/nginx/html; - } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 #