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?
-
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 Answers
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.
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.
Step 5. You can use github to delpoy your webapp.
You can open github site and check the action result. After few minutes, it will success.
Step 6. Then you first django web app will deploy successfully.
PREVIOUS
You can check application log to solve the issue.
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

- 15,263
- 1
- 14
- 29
-
-
-
dude thanks for the support, i've already checked the article but it doesn't work, maybe i'm missing something. – Novice BL Apr 06 '21 at 10:58
-
@NoviceBL https://stories.mlh.io/deploying-a-basic-django-app-using-azure-app-services-71ec3b21db08 – Jason Pan Apr 07 '21 at 09:16