In my Django project's settings.py
for deployment i want mywebsite.com
to be the allowed hosts but putting it so throws the 500 error.
For production server when i use:
ALLOWED_HOSTS = ['localhost', 'mywebsite.com']
It throws error 500 on every page.
But if i change it to
ALLOWED_HOSTS = ['*']
It works fine.
I checked error.log
of nginx but there is not error logged.
But i guess its not safe to keep *
and i just want to keep mywebsite.com
or www.mywebsite.com
Please suggest why its throwing 500 error.
Thanks