0

so i've tested my djangoApp locally and everything went fine, then i used microsoft Azur to deploy my App, many users were able to register but most of them got the error 500,i want to know what's could be the problem and how can i fix it?

Novice BL
  • 15
  • 7
  • I have updated my answer which contain how to deploy django web app in linux. – Jason Pan Apr 09 '21 at 08:27
  • If my solution inspires or helps you, could you mark my answer as [accepted](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work) , Tks~ – Jason Pan Apr 09 '21 at 08:28

1 Answers1

0

Newest

Step 1. Create a sample django project.

django-admin startproject djangosample

Step 2. Add your domain to ALLOWED_HOSTS. And you also need create a requirements.txt file.

enter image description here

enter image description here

Step 3. Upload code to github.

git init
git add .
git commit -m "first commit"
git remote add origin https://github.com/Jason446620/djangosampleforlinux.git
git push -u origin master

Step 4. After upload your project, your file directory structure should look like this.

enter image description here

Step 5. You can use github to delpoy your webapp.

enter image description here

You can open github site and check the action result. After few minutes, it will success.

enter image description here

Step 6. Then you first django web app will deploy successfully.

enter image description here

PREVIOUS

  1. You can check application log to solve the issue.

    enter image description here

  2. The second way, you can add startup command.

Below article is good, you can read it, it will help you.


The 500 error is an internal error of the server. According to your description, I think you should be using the windows platform.

You need to use HttpPlatformHandler in the web.config file, which will solve your problem.

Related Posts:

1. Django Hello World with HttpPlatformHandler using Azure Web App (Windows)

2. How to deploy a Flask+React application to Azure Web Service

Jason Pan
  • 15,263
  • 1
  • 14
  • 29