title: All Laravel routes are not found (404 error) on https://proclubs.app/login
body: <p>I have deployed my Laravel app to the following url proclubs.app - this is a domain from Google domains that requires an SSL certificate (the SSL has been setup using Certbot).</p>
  <p>I have setup the Laravel Breeze package for authentication (e.g register/login functionality) and this all works fine when testing locally, now I have pushed this to a remote URL none of the routes don't work, and I just get a <code>404 Not Found</code> message. I have ran the <code>php artisan route:list</code> and can see all the expected routes are there. I am 99% certain I have made a mistake with the nginx server block - I have used the default one that digitalocean provide in <code>etc/nginx/sites-available</code> and edited it accordingly, but not sure what is incorrect for me to get these 404 errors, can anyone suggest what I have done wrong?</p>
  <pre><code>server {
      listen 80 default_server;
      listen [::]:80 default_server ipv6only=on;
  
      root /var/www/proclubs/public;
      index index.php index.html index.htm;
  
      # Laravel related only
      add_header X-Frame-Options &quot;SAMEORIGIN&quot;;
      add_header X-Content-Type-Options &quot;nosniff&quot;;
      index index.php;
      charset utf-8;
  
      # Make site accessible from http://localhost/
      server_name proclubs.app www.proclubs.app;
  
      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;
      error_page 500 502 503 504 /50x.html;
      location = /50x.html {
          root /usr/share/nginx/html;
      }
  
      location ~ \.php$ {
          fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
          fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
          include fastcgi_params;
      }
  
      # deny access to .htaccess files, if Apache's document root
      # concurs with nginx's one
      #
      location ~ /\.(?!well-known).* {
          deny all;
      }
  }
  
  
  # another virtual host using mix of IP-, name-, and port-based configuration
  #
  #server {
  #   listen 8000;
  #   listen somename:8080;
  #   server_name somename alias another.alias;
  #   root html;
  #   index index.html index.htm;
  #
  #   location / {
  #       try_files $uri $uri/ =404;
  #   }
  #}
  
  
  # HTTPS server
  #
  #server {
  #   listen 443;
  #   server_name localhost;
  #
  #   root html;
  #   index index.html index.htm;
  #
  #   ssl on;
  #   ssl_certificate cert.pem;
  #   ssl_certificate_key cert.key;
  #
  #   ssl_session_timeout 5m;
  #
  #   ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
  #   ssl_ciphers &quot;HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES&quot;;
  #   ssl_prefer_server_ciphers on;
  #
  #   location / {
  #       try_files $uri $uri/ =404;
  #   }
  #}
  
  
  server {
  
      root /var/www/proclubs/public;
      index index.php index.html index.htm;
  
      # Make site accessible from http://localhost/
      server_name proclubs.app www.proclubs.app; # managed by Certbot
  
  
      location / {
          # First attempt to serve request as file, then
          # as directory, then fall back to displaying a 404.
          try_files $uri $uri/ =404;
          # Uncomment to enable naxsi on this location
          # include /etc/nginx/naxsi.rules
      }
  
      error_page 404 /404.html;
      error_page 500 502 503 504 /50x.html;
      location = /50x.html {
          root /usr/share/nginx/html;
      }
  
      location ~ \.php$ {
          include snippets/fastcgi-php.conf;
          fastcgi_pass unix:/run/php/php7.4-fpm.sock;
      }
  
      # deny access to .htaccess files, if Apache's document root
      # concurs with nginx's one
      #
      #location ~ /\.ht {
      #   deny all;
      #}
  
  
      listen [::]:443 ssl ipv6only=on; # managed by Certbot
      listen 443 ssl; # managed by Certbot
      ssl_certificate /etc/letsencrypt/live/proclubs.app/fullchain.pem; # managed by Certbot
      ssl_certificate_key /etc/letsencrypt/live/proclubs.app/privkey.pem; # managed by Certbot
      include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
      ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  
  
  
  }
  
  server {
      if ($host = www.proclubs.app) {
          return 301 https://$host$request_uri;
      } # managed by Certbot
  
  
      if ($host = proclubs.app) {
          return 301 https://$host$request_uri;
      } # managed by Certbot
  
  
      listen 80 ;
      listen [::]:80  ;
      server_name proclubs.app www.proclubs.app;
      return 404; # managed by Certbot
  }
  </code></pre>
  <p>-- Expected behaviour --</p>
  <p>When a user visits the webpage <code>https://proclubs.app/login</code> OR <code>https://proclubs.app/login</code> I expect to see the Laravel Breeze default login page.</p>
  <p>-- Actual Behaviour --</p>
  <p>When I visit <code>https://proclubs.app/login</code> I just see a <code>404 Not Found</code> nginx error instead &amp; no routes are working.</p>
  <p>p.s i am confused why I have 3 server blocks too...</p>
  <p>Server - <code>nginx/1.18.0 (Ubunto 20.04) on DigitalOcean LEMP droplet</code></p>