HI everyone, and thank you in advance for taking a look!
I have installed Django using virtualenv as per this article.
My site resides here.
Relevant changes to settings.py:
ALLOWED_HOSTS = ['greatbigbrain.com', 'www.greatbigbrain.com']
STATIC_ROOT = '/home/greatbigbrain/greatbigbrain.com/public/static/'
I tried putting ‘*’ in my allowed hosts but it didn’t do anything (do I need to restart the application for this to take effect? How do I do that??).
Googling the issue, it seems people run into this when
DEBUG is set to False, but mine is True.
Finally, I haven’t a clue as to how to check server logs for errors.
Thanks again, and please let me know if more information is required.
What’s the complete traceback?
Hi there - what’s a traceback?
The traceback it’s like a story that helps us find the root cause of an error.
For example, in this python3 idle session, i will raise a error on purpose:
Python 3.8.10 (default, Jun 22 2022, 20:18:18)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 3 + ""
# Making the error happen
# This is the traceback, all of it
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for +: 'int' and 'str'
Ah, gotcha. How do I find/view that?
You will need to find your Django main proccess. It’s there that the traceback it’s reported.
This is normally found on the stdout of the command that started django.
If i run:
python manage.py runserver
Then the errors are displayed on the terminal that i ran this.
So if I visit the admin page in my terminal, I get this? Is this what you need?
--2023-03-08 04:25:12-- https://greatbigbrain.com/admin
Resolving greatbigbrain.com (greatbigbrain.com)... 184.108.40.206
Connecting to greatbigbrain.com (greatbigbrain.com)|220.127.116.11|:443... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2023-03-08 04:25:13 ERROR 500: Internal Server Error.
How did you started the application? You probably have a VPS (Virtual Private Server) machine, in that machine how did you started django?
I’m on a shared server. All I remember doing is this in my virtual environment:
python3 venv/bin/django-admin startproject projectname
Are you following a tutorial or other material?
It looks like Passenger does some of the job for you. In this case, i’m don’t think that i can help you, but maybe other people here already has done this sort of stuff and can help you.
See their article at: https://help.dreamhost.com/hc/en-us/articles/216512217