Forums

Settings file seems to not update when refreshing website

I've had an incident where I lost files of my webserver, and recently just recovered them, however now when I put back my files in the right directory I face the issue where it tells me:

DisallowedHost at / Invalid HTTP_HOST header: 'XXX'. You may need to add 'XXX' to ALLOWED_HOSTS.

However, my settings.py file does include the url 'XXX' in the allowed_hosts.

I have tried to see what is going on, and it seems the project is ignoring my changes when refreshing, and I can't seem to find a way to force it to read the contents.

Any idea?

EDIT: Seems to have been resolved by changing the working directory to add the folder of the app, but that was never the case before. So I am not sure why

Are you sure that after the file recovery the file structure of your web app was exactly the same as previously? How are you pointing to the settings module in the wsgi file?