PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, July 13, 2022

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

 July 13, 2022     debugging, django, python, ubuntu, web-deployment     No comments   

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)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

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

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing