title: 404 not found for assets nginx laravel
body: <p>We have a laravel project deployed on nginx. Some of css and js files cannot be accessed and returns 404 error. We have checked the routing and permissions several times. What could be the problem?</p>
  <p><strong>Update</strong>:
  This is the nginx config:</p>
  <pre><code>server {
  listen 80;
  index index.php index.html;
  error_log  /var/log/nginx/error.log;
  access_log /var/log/nginx/access.log;
  root /var/www/public;
  
  location / {
      try_files $uri $uri/ /index.php?q=$uri&amp;$args;
      gzip_static off;
  
  location ~ \.php$ {
      fastcgi_split_path_info ^(.+\.php)(/.+)$;
      fastcgi_pass xxx.xxx.xx.x:9000;
      fastcgi_cache_background_update on;
      fastcgi_index index.php;
      include fastcgi_params;
      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
      fastcgi_param PATH_INFO $fastcgi_path_info;
  }
  
  
  }
  
  }
  </code></pre>
  <p>There are some files that seem nginx has access to their directory, so the problem shall not become from nginx config as I suppose.
  There should be something wrong with laravel which cannot load the assets correctly.
  This is the code to access the file that returns 404:</p>
  <pre><code>&lt;link href=&quot;{{asset('/css/bootstrap.css')}}&quot; rel=&quot;stylesheet&quot;&gt;
  </code></pre>