Skip to content

Instantly share code, notes, and snippets.

@enqtran
Created August 11, 2021 12:40
Show Gist options
  • Save enqtran/5c9695c1e50b853ccfa33f55d7614f1f to your computer and use it in GitHub Desktop.
Save enqtran/5c9695c1e50b853ccfa33f55d7614f1f to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name app.mydomain.com;
root /srv/app-name;
index index.html;
# Other config you desire (TLS, logging, etc)...
location / {
try_files $uri /index.html;
}
}
@enqtran
Copy link
Author

enqtran commented Aug 11, 2021

server {
listen 80 default_server;
root /var/www/[Your repo name]/build;
server_name [your.domain.com] [your other domain if you want to];
index index.html index.htm;
location / {
}
}
location /files/ {
autoindex on;
root /var/www/[your repo name]/files;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment