title: axios get request returning the vue index.html file for all static html files i'm trying to serve
body: <p>So, I have a vue app that's working well on my MAC running <code>npm run serve</code>.</p>
  
  <p>Running <code>npm run build</code> and deploy my code to my CENTOS environment (using NGINX) all of the .get requests are coming back are returning a 200 in the network tab, but the content should be a static html file that i'm pulling into my app.</p>
  
  <p>here are some code samples:</p>
  
  <pre><code>this.axios.get(flatHtmlLocation).then(response =&gt; {
                  let corsHTML = response.data;
                  let htmlDoc = (new DOMParser()).parseFromString(corsHTML, "text/html");
                  this.rawDog = htmlDoc;
                  this.htmlData = htmlDoc.documentElement.getElementsByTagName('body')[0].innerHTML;
              })
  </code></pre>
  
  <p>^ this works just fine when I'm playing around on my Mac. </p>
  
  <p>I'm pulling my static .html files from the /public/ directory in a specific directory. </p>
  
  <p>Here is what my file structure looks like:</p>
  
  <p>name of app</p>
  
  <pre><code>-- public
       index.html
       /directory-where-static-html-lives/filename.html 
    -- src
       -- components/component/file_pulling_the_static_asset.vue
  </code></pre>
  
  <p>Here is a copy of my .conf (NGINX) file for the app in prod that I'm using:</p>
  
  <pre><code>    server {
      listen 80 default_server;
      listen [::]:80 default_server;
  
  
      server_name _;
  
      location /api/ {
          proxy_set_header Host $host;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_redirect off;
          proxy_buffering off;
          proxy_pass http://some-fancy-pants-url:4000;
      }
   location /public/ {
          root /opt/location-of-my-app;
      }
  
      location / {
          root    /opt/location-of-my-app/dist;
          index    index.html index.htm;
          include  /etc/nginx/mime.types;
          try_files $uri $uri/ /index.html;
      }
  
  
  
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/hUuE9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hUuE9.png" alt="200 response from axios GET on production after npm run build"></a></p>
  
  <p><a href="https://i.stack.imgur.com/Rd5Hu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Rd5Hu.png" alt="content of 200 response is the static Vue.js html landing page"></a></p>
  
  <p><a href="https://i.stack.imgur.com/IixGL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IixGL.png" alt="VUE /public/ html landing page.. "></a></p>