diff --git a/.docker/nginx/app.conf b/.docker/nginx/app.conf index d1c02106..b5e67fcc 100644 --- a/.docker/nginx/app.conf +++ b/.docker/nginx/app.conf @@ -1,10 +1,10 @@ server { listen 80; - index index.php; + index index.html index.php; root /var/www/html; location ~ \.(ico|css|js|gif|jpe?g|png|woff2?|ttf|otf|svg|eot)$ { - try_files $uri /$request_uri; + try_files $uri =404; # Optional: Don't log access to other assets access_log off; } @@ -17,8 +17,17 @@ server { fastcgi_param PATH_INFO $fastcgi_path_info; } + location = / { + try_files /index.html =404; + gzip_static on; + } + + location ~ \.html$ { + try_files $uri =404; + } + location / { - try_files $uri $uri/index.html; + try_files $uri $uri/index.html $uri/ =404; gzip_static on; }