You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is mostly to capture documentation about a specific issue with my development setup and the nginx configuration.
Setup:
VirtualBox Port Forwarding Host 8082 <-> Guest 80.
When accessing the static assets the following behaviour is observed:
http://localhost:8082/sitemap/test.txt -> HTTP 200 OK (test.txt was created for testing purpose)
http://localhost:8082/sitemap/ -> HTTP 403 Forbidden (that's ok, directory listing is disabled)
http://localhost:8082/sitemap -> HTTP 301 Moved Permanently Location: http://localhost/sitemap/
Nginx will automatically try a redirect to a resource with a trailing slash if no resource was found without the trailing slash. The behaviour is fine except that the port is missing from the redirect.
I was able to fix the issue locally by using a configuration similar to:
The idea is to build the redirect url with $http_host. We also want to restrict the redirect to known assets (sitemap, downloads ...) to avoid applying it to app (e.g. vascan).
The text was updated successfully, but these errors were encountered:
This issue is mostly to capture documentation about a specific issue with my development setup and the nginx configuration.
Setup:
VirtualBox Port Forwarding Host 8082 <-> Guest 80.
When accessing the static assets the following behaviour is observed:
Nginx will automatically try a redirect to a resource with a trailing slash if no resource was found without the trailing slash. The behaviour is fine except that the port is missing from the redirect.
I was able to fix the issue locally by using a configuration similar to:
The idea is to build the redirect url with $http_host. We also want to restrict the redirect to known assets (sitemap, downloads ...) to avoid applying it to app (e.g. vascan).
The text was updated successfully, but these errors were encountered: