'Nginx server doesn't serve GET requests with parameters on EC2 instance
I've got my nginx server running a php8.0 and Laravel 8.0 web app on an ec2 instance running Ubuntu 18.04. So the web app works just fine, I can access the DB, look up data and insert new data, all the requests for this things are POST or GET requests with no params. But when I try to do GET requests that have parameters the app just shows a white screen, like nothing is happening. For example:
This GET request doesn't work:
This GET request does work:
http://mypublicamazonurl.com/labels
My server conf file looks like this:
server {
listen 80;
root /var/www/Proyecto-Final-IAW/las-olivas/public;
index index.php index.html index.htm index.nginx-debian.html;
server_name 'mypublicurl.com' 'www.mypublicurl.com';
location / {
try_files $uri $uri/ /index.php$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
This is my very first time setting a server so any help/tip is appreciated and hopefully I was clear.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
