My Laravel application runs locally and remotely on the main domain (https://www.example.com and https://example.com), but my staging environment doesn't work. The main page works, but other routes don't (I get a 504).
The nginx.conf I use is the following:
location / {
try_files $uri $uri/ /index.php?$query_string;
gzip_static on;
if ($http_x_forwarded_proto = 'http'){
return 301 https://$host$request_uri;
}
}
How do I add https://staging.example.com to this configuration?