Skip to content

nginx config fix #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 13 additions & 16 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
daemon off;

server {
listen 80 default_server;
listen 80 default_server;

root /app;

root /app;
# Logging
access_log /dev/stdout;
error_log /dev/stderr;

# normal routes
# serve given url and default to index.html if not found
# e.g. /, /user and /foo/bar will return index.html
location / {
try_files $uri $uri/index.html /index.html;
}
location / {
try_files $uri $uri/ /index.html;
}

# files
# for all routes matching a dot, check for files and return 404 if not found
# e.g. /file.js returns a 404 if not found
location ~ \.(?!html) {
try_files $uri =404;
}
# Files
location ~ \.(?!html) {
try_files $uri =404;
}
}