Skip to content

Instantly share code, notes, and snippets.

@bouroo
Created July 14, 2024 07:28
Show Gist options
  • Save bouroo/ee9cef97006f04eb6d70255ae2534495 to your computer and use it in GitHub Desktop.
Save bouroo/ee9cef97006f04eb6d70255ae2534495 to your computer and use it in GitHub Desktop.
simple nginx/unit config to serve SPA
{
"listeners": {
"*:8080": {
"pass": "routes/main"
}
},
"routes": {
"main": [
{
"action": {
"share": ["/www$uri", "/www/$uri"],
"fallback": {
"share": "/www/index.html"
}
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment