Hardware: VPS bought online YunoHost version: 11.0.10.2 I have access to my server : Through SSH + through the webadmin Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
Description of my issue
I quit using Netlify and I am self hosting my website with YunoHost now.
There are some things that Netlify fixed automatically, but that break here.
How could I fix this in Nginx without breaking anything else in YunoHost?
Note: tommi.space is my_webapp’s domain, and also my main TLD. I use many others sub-domains on the server, for example server.tommi.space or stream.tommi.space. I do not want to mess things up for the subdomains by changing something in tommi.space Nginx configuration.
After a quick Internet search and per How to make URL case insensitive with Nginx - Stack Overflow, you need to alter your NGINX conf file with sudo nano /etc/nginx/conf.d/tommi.space.d/my_webapp.conf.
In there, replace the first location line with:
location ~* ^/ {
Save and exit with CTRL+O then CTRL+X.
Check that NGINX is happy with nginx -t.
If no complains arise, reload NGINX sudo systemctl reload nginx.
OK so there’s a redirection loop, seemingly because the try_files directive indeed sends you to /index.php which starts by / so it loads again the same location block. Try editing the line to remove the leading slash:
Check that NGINX is happy with nginx -t.
If no complain arises, reload NGINX sudo systemctl reload nginx.