Skip to content

Instantly share code, notes, and snippets.

@jozsefsallai
Created December 2, 2018 10:49
Show Gist options
  • Save jozsefsallai/8c8bc78d90a3dc461f663f7e612314d6 to your computer and use it in GitHub Desktop.
Save jozsefsallai/8c8bc78d90a3dc461f663f7e612314d6 to your computer and use it in GitHub Desktop.
nginx config for Vue SPA (built with vue-cli-service)
server {
listen 80;
server_name yourdomain.ex;
root /path/to/spa/dist/;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment