ouhft / COPE

Project Repository for Work Package 4 of the COPE Transplant Trial
https://cope.nds.ox.ac.uk
1 stars 0 forks source link

Test Server not displaying Cope system - 404 errors #330

Open marshalc opened 5 years ago

marshalc commented 5 years ago
Page not found (404)

Request Method: | GET
-- | --
http://dev.nds.ox.ac.uk/cope//

Using the URLconf defined in config.urls, Django tried these URL patterns, in this order:
^i18n/
en-gb/
The current path, /, didn't match any of these.
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.

Essentially some part of the nginix/django configuration is inserting an extra slash at the end of the proxy path, but the start of the application path. URLs in the browser look correct, but:

https://dev.nds.ox.ac.uk/cope/ --> http://dev.nds.ox.ac.uk/cope// http://dev.nds.ox.ac.uk/cope --> redirects to https://dev.nds.ox.ac.uk/cope/en-gb/, and then gives this 404 for http://dev.nds.ox.ac.uk/cope//en-gb/ https://dev.nds.ox.ac.uk/cope/en-gb/admin --> http://dev.nds.ox.ac.uk/cope//en-gb/admin

This isn't affecting the QUOD site, which is presently on Django 1.11.4, so suspecting some sort of interaction issue between Django 2.0.7 (was working with Django 2.0.1?) and NGinx.

marshalc commented 5 years ago

May be related to how I solved this initially - https://stackoverflow.com/questions/44987110/django-in-subdirectory-admin-site-is-not-working/47099986#47099986

https://www.nginx.com/resources/wiki/start/topics/examples/forwarded/ doesn't show any reasons for NGinx not working as expected. And no other clues have appeared in more recent times.

Leaving server in this state as it's not a priority