diff --git a/deploy/example_nginx.conf b/deploy/example_nginx.conf index b0c0e8e5a0..a4f042739c 100644 --- a/deploy/example_nginx.conf +++ b/deploy/example_nginx.conf @@ -41,16 +41,8 @@ http { # server_name example.com www.example.com; keepalive_timeout 5; - - # path for static files - root /app/WebHostLib; - + location / { - # checks for static file, if not found proxy to app - try_files $uri @proxy_to_app; - } - - location @proxy_to_app { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; @@ -60,5 +52,14 @@ http { proxy_pass http://app_server; } + + location /static/ { + root /app/WebHostLib/; + autoindex off; + } + + location = /favicon.ico { + alias /app/WebHostLib/static/static/favicon.ico; + access_log off; } }