title: Laravel API route get 404 on Nginx
body: <p>I have a Laravel project. It works on Mac os with nginx.
  I recentlly installed a CentOs 8. I installed Nginx on it and add the configuration bellow:</p>
  
  <pre><code>
  server {
      listen 8001;
      server_name _;
      root /usr/share/nginx/html/reservation_laravel/public;
  
      add_header X-Frame-Options "SAMEORIGIN";
      add_header X-XSS-Protection "1; mode=block";
      add_header X-Content-Type-Options "nosniff";
  
      index index.html index.htm index.php;
  
      charset utf-8;
  
      location / {
          try_files $uri $uri/ /index.php?$query_string;
      }
  
      location = /favicon.ico { access_log off; log_not_found off; }
      location = /robots.txt  { access_log off; log_not_found off; }
  
      error_page 404 /index.php;
  
      location ~ \.php$ {
          try_files $uri =404;
          fastcgi_split_path_info ^(.+\.php)(/.+)$;
          fastcgi_pass unix:/run/php-fpm/www.sock;
          fastcgi_index index.php;
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
          include fastcgi_params;
      }
  
      location ~ /\.(?!well-known).* {
          deny all;
      }
  
  
  </code></pre>
  
  <p>All routes inside web.php work fine but API routes not working!
  Same configuration is working on an Ubuntu server!</p>