title: Vue CLI. Publish with subdomains
body: <p>I need to publish Vue CLI project that supports dynamic subdomains. 
  The main idea is that every request on *.example.com will come on root directory dist/index.html.</p>
  
  <p>What i tried:
  Nginx server name *.example.com / server alias.
  Apache server alias *.example.com</p>
  
  <p>Main request example.com - is ok, but *.example.com not working.</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
          DocumentRoot "/Users/admin/Sites/example/dist"
          ServerName example.local
          ServerAlias *.example.local
          #VirtualDocumentRoot /Users/admin/Sites/example/dist
          #&lt;Directory "/Users/admin/Sites/example/dist/"&gt;
          #       AllowOverride All
          #       Require local
          #       Options Indexes FollowSymLinks
          #       Order Deny,Allow
          #       Allow from all
          #       Deny from all
          #       #Require all granted
          #&lt;/Directory&gt;
          ErrorLog "/private/var/log/apache2/example-error_log"
          CustomLog "/private/var/log/apache2/example-access_log" common
  &lt;/VirtualHost&gt;
  
  server {
          listen       8080;
          root /Users/admin/Sites/example/dist;
          server_name *.example.local;
  
          location / {
              #root   dist;
              #index  index.html index.htm;
          }
      }
  </code></pre>
  
  <p>I think i tried all of google-advices. But no luck. I found out that ServerAlias doesnt work at all.</p>
  
  <p>I have Apache 2.4, and mac os system.</p>
  
  <p>Has anyone encountered such a problem? It turned out to solve? Maybe there are other ways?</p>
  
  <p>Thank you! </p>