Skip to content

Instantly share code, notes, and snippets.

@inecmc
Created March 27, 2017 12:24
Show Gist options
  • Save inecmc/2a31919fe9395ff6075ff6eace54fd81 to your computer and use it in GitHub Desktop.
Save inecmc/2a31919fe9395ff6075ff6eace54fd81 to your computer and use it in GitHub Desktop.
Nginx config : remove hashbang in vue.js
 server {
   listen 80;
   listen [::]:80;

   root /path/to/your/project/dist;

   index index.html;

   server_name example.com;

   location / {
     try_files $uri $uri/ @rewrites;
   }

   location @rewrites {
     rewrite ^(.+)$ /index.html last;
   }

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