ricktbaker / beanstalk-nginx-php-fpm

How to replace apache with nginx and php-fpm on AWS beanstalk
MIT License
74 stars 27 forks source link

Other routes than home return not found for laravel applications - FIX #9

Open icecold21 opened 6 years ago

icecold21 commented 6 years ago

Hi, thanks for the package, this package is awesome.

Here is some gotchas if you found error routing problem.

Try changing location block in nginx.conf to

location / {
      try_files $uri $uri/ /index.php?$query_string;
}

basically $args -> $query_string

hope this helps you guys.

jeff-kilbride commented 6 years ago

@icecold21 Did this change make a difference? The $args and $query_string variables should be identical:

http://nginx.org/en/docs/http/ngx_http_core_module.html#variables

Just curious.