title: laravel not working in nginx as alias
body: <p>i have a nginx webserver and i want to run multiple laravel projects on it</p>
  
  <p>first project is working fine but second project only opens home and home page address is</p>
  
  <pre><code>example.com/secondproject/
  </code></pre>
  
  <p>but when i want to open </p>
  
  <pre><code>example.com/secondproject/foo
  </code></pre>
  
  <p>nginx would skip /secondproject alias and looks for requested route in first project (root of server in nginx config)</p>
  
  <p>this is my config</p>
  
  <pre><code>server {
      listen 80;
      server_name example.com;
      rewrite_log on;
  
      location / {
  
          root /path/to/first-project/public;
          index index.php index.html index.htm;
  
          try_files $uri $uri/ $uri/index.php /index.php;
  
          location ~ \.php$ {
              fastcgi_pass unix:/run/php-fpm/www.sock;
              fastcgi_index index.php;
              include fastcgi_params;
              fastcgi_param SCRIPT_FILENAME $request_filename;
              fastcgi_split_path_info ^(.+\.php)(/.+)$;
          }
  
      }
      location /secondproject {
  
          alias /path/to/second-project/public;
          index index.php;
  
          location /secondproject {
              try_files $uri $uri/ $uri/index.php /index.php;
          }
  
          location ~ \.php$ {
              fastcgi_pass unix:/run/php-fpm/www.sock;
              fastcgi_index index.php;
              include fastcgi_params;
              fastcgi_param SCRIPT_FILENAME $request_filename;
              fastcgi_split_path_info ^(.+\.php)(/.+)$;
          }
  
      }
  
  }
  </code></pre>
  
  <p>and when i replace </p>
  
  <pre><code>root /path/to/second-project/public;
  </code></pre>
  
  <p>instead of </p>
  
  <pre><code>alias /path/to/second-project/public;
  </code></pre>
  
  <p>nginx shows 403!</p>