From 5bfbbc967ed86ed868d1d086a3bf1fdf5db4a29d Mon Sep 17 00:00:00 2001 From: "Fabian Althaus [el-j]" Date: Thu, 29 Aug 2024 13:22:33 +0200 Subject: [PATCH] Update history-mode.md nginx example as i was really struggling with the nginx example, because i deployed in a docker nginx-alpine image that doesn't need any config in development mode with hash-router, i changed the example to a full working server config example that works in a fresh nginx docker-image. --- packages/docs/guide/essentials/history-mode.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/docs/guide/essentials/history-mode.md b/packages/docs/guide/essentials/history-mode.md index 8cb720e93..62684d089 100644 --- a/packages/docs/guide/essentials/history-mode.md +++ b/packages/docs/guide/essentials/history-mode.md @@ -87,9 +87,16 @@ Instead of `mod_rewrite`, you could also use [`FallbackResource`](https://httpd. ### nginx +`/etc/nginx/conf.d/default.conf` ```nginx -location / { - try_files $uri $uri/ /index.html; +server { + listen 80; + server_name localhost; + root /usr/share/nginx/html; + index index.html; + location / { + try_files $uri $uri/ /index.html; + } } ```