Wednesday, July 13, 2022

[FIXED] How can I safely debug my Django Website hosted on apache2 server?

Issue

I am trying to change my website which is hosted on a Linux machine with Ubuntu. I am able to access it using ssh username@serverIPadress command on my local machine.

Now, when I change my code I get a 500 server error message, so I can't check where I am doing something wrong.

Do I have to change Debug = True in my settings.py file and what do I need to fill in at ALLOWED HOSTS? Currently, I have ALLOWED HOSTS = {domainname, server IP}.

So, is there a secure way to change my deployed Django Website locally on my own machine?

Maybe, I am changing it too complicated, but I am not a webdeveloper. I can't get an answer when I read the documentation.

Thank you in advance.


Solution

You can use debug_toolbar by adding it in setting.py installed app and adding allowed ip at the end

INTERNAL_IPS = ['your ip']


Answered By - Ali_Sheikhi
Answer Checked By - Marilyn (PHPFixing Volunteer)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.