This commit is contained in:
parent
04ae69fc02
commit
a8499df77a
18
nginx.conf
Normal file
18
nginx.conf
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
# Wo die Dateien liegen
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html index.htm;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
# DIE MAGISCHE ZEILE:
|
||||||
|
# 1. Versuche die Datei zu finden ($uri)
|
||||||
|
# 2. Versuche den Ordner zu finden ($uri/)
|
||||||
|
# 3. Wenn beides fehlschlägt, lade die index.html
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Optional: Fehlerseiten auch auf index.html umleiten
|
||||||
|
error_page 404 /index.html;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user