title: How can I get Lumen 5.4 routes to work on nginx 1.12.1?
body: <p>The issue is that apart from the '/public' route, no other route works.. e.g routes like '/public/test' throws 404 error. I have googled and tired every suggestion, still no solution. I have also tried the links below, they all didn't work for me. I using Amazon AMI Linux version.</p>
  
  <p><a href="https://stackoverflow.com/questions/35779743/creating-new-lumen-app-on-nginx-throwing-404-when-hiting-ip-adress-through-brows">Creating new Lumen app on nginx throwing 404 when hiting IP Adress through browser</a></p>
  
  <p><a href="https://stackoverflow.com/questions/31493634/laravel-routes-not-found-on-nginx">Laravel routes not found on nginx</a></p>
  
  <p>Here is my nginx.conf</p>
  
  <pre><code>server {
      listen       80;
      #listen       [::]:80 default_server;
      server_name  18....my_ip;
      #root         /usr/share/nginx/html;
      root /var/www/html/dev;
  
      # Load configuration files for the default server block.
      include /etc/nginx/default.d/*.conf;
  
      location / {
  
              try_files $uri $uri/ /index.php?$query_string;
  
      }
  
      location ~ \.php$ {
              try_files $uri $uri/ /index.php?$query_string;
              fastcgi_pass 127.0.0.1:9000;
              fastcgi_index index.php;
              fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
              include fastcgi_par
  </code></pre>