Created
April 19, 2019 18:26
-
-
Save eldarshamukhamedov/c01f7815fc852fc36428b1219f23f341 to your computer and use it in GitHub Desktop.
NGINX config to serve React Router V4 apps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name localhost; | |
location /healthz { | |
return 200 'OK'; | |
add_header Content-Type text/plain; | |
} | |
location / { | |
root /usr/share/nginx/html; | |
index index.html index.htm; | |
try_files $uri $uri/ /index.html; | |
} | |
# redirect server error pages to the static page /50x.html | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root /usr/share/nginx/html; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment