title: How to setup nginx laravel + vue cli project
body: <p>Hi I'm create laravel for BackOffice and Api for frontend.</p>
  
  <p>In frontend I use vuejs.</p>
  
  <p>How to setup nginx </p>
  
  <ul>
  <li>if find path /admin -> enter to laravelproject</li>
  <li>if find path /api -> enter to laravel project</li>
  <li>else just enter in vue project</li>
  </ul>
  
  <p>Here Is what I use now </p>
  
  <pre><code>server {
      listen 80 default_server;
      listen [::]:80 default_server;
  
      root /var/www/html;
  
      index index.html index.php  index.htm index.nginx-debian.html;
  
      server_name localhost;
  
      location / {
          // Here is working fine run index.html ( vue )
          try_files $uri $uri/ = /index.html;
      }
  
      location ~ \.php$ {
        // setup php version
        include snippets/fastcgi-php.conf;
  
        fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
     }
  
      location  /api {
          // I want to go in laravel path here. It's not working 
           root /var/www/html/serverside/public;
           try_files $uri $uri/ /index.php?$query_string;
      }
  
      location  /admin {
          // I want to go in laravel path here.It's not working 
           root /var/www/html/serverside/public;
           try_files $uri $uri/ /index.php?$query_string;
      }
  
  }
  </code></pre>
  
  <p>Here is my folder structure </p>
  
  <pre><code>/var/www/html/serverside/laravelproject ( in serverside laravel project locate here )
  /var/www/html/index.html ( Here is vue js )
  </code></pre>
  
  <p>***** <strong>UPDATE</strong> *****</p>
  
  <p>Here is my laravel.conf</p>
  
  <pre><code>server {
      listen 80;
      root /var/www/html/serverside/public;
      index  index.php index.html index.htm;
      server_name  localhost;
  
      location / {
          try_files $uri $uri/ /index.php?$query_string;        
      }
  
  
      location ~ \.php$ {
         include snippets/fastcgi-php.conf;
         fastcgi_pass             unix:/var/run/php/php7.2-fpm.sock;
         fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
      }
  
  }
  </code></pre>
  
  <p>nginx error.log show 
  /<code>etc/nginx/sites-enabled/laravel.conf" failed (40: Too many levels of symbolic links) in /etc/nginx/nginx.conf:</code>62</p>