Skip to content

Instantly share code, notes, and snippets.

@nma
Created June 30, 2016 18:34
Show Gist options
  • Save nma/ae37618ea76f4d08b58f5b3729b6e836 to your computer and use it in GitHub Desktop.
Save nma/ae37618ea76f4d08b58f5b3729b6e836 to your computer and use it in GitHub Desktop.
Nginx config for use with ember HISTORYLOCATION
server {
root /var/www/{Your App Directory Path Here};
index index.html index.htm;
server_name {Your website URL or IP address here};
location / {
try_files $uri $uri/ /index.html?/$request_uri;
}
}
@nma
Copy link
Author

nma commented Jun 30, 2016

useful for react-router applications hosted on an Nginx Docker Container.

sample docker file

FROM nginx
COPY <gistfilecontents>.conf /etc/nginx/conf.d
COPY dist/ /usr/share/nginx/html

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