Django application deployment problem and error logs - django

I am trying to deploy my django application to VPS but I get 505- Internal Server Error and it is normal for the first time.
However, the admin of the VPS server do not allow me to see the error logs of the Apache Server. In such situation, is there any way to view the real error messagges/logs ?
Thanks

If you deployed your app with DEBUG=True maybe the error message can help you.
Your vps admin should give to you at least a copy of your log files.. i don't see another way..

Related

My Django App only works on heroku when server is running locally

I have built an app using react and django. After deploying the app on heroku, when I open it the frontend works fine. However when i try to do any action that sends requests to the backend I get errors. The only time the requests work fine is when the django backend is running locally. I hsve been looking allover for solutions and have not been able to find any solutions. In my settings.py The heroku domain name is added to the allowed hosts
ALLOWED_HOSTS = ['127.0.0.1', 'localhost', 'barkbnb-demo.herokuapp.com']
If anyone can point me in the right direction on where to begin looking for solving the issue that would be greatly appreciated.
Thanks!
Check your request string in React app when you call your backend. It looks like it uses local address there.

Django + React App in Azure gives a server error - 500 everytime

I have deployed a Django app to Azure through Github actions to Azure app service. But it gives a Server error 500 everytime. I have configured the static files and react template properly. In the Diagnose tab there's no error is displaying. How can I troubleshoot and find the error or Is there any other things to configure in Azure? I hosted a same copy in Heroku and it works there.
Make sure you are using the below steps:
SCM_DO_BUILD_DURING_DEPLOYMENT=true – With this setting set to true - Kudu will execute build steps on your site during deployment.
DEBUG = 0 - please check (if this can make any change) after adding this config to your configuration.
You need to enable the Detailed error pages in your portal. This may give a detailed log to know why it happened.
Try Adding Application Insights to your App to check the detailed logs
Best practices to deploy your Application
Refer here Link 1 & Link 2

Application Error while my Django app successfully deployed

I am leaving a question of why I got an application error after deploying Django successfully. It seems like I could deploy my Django app to Heroku, but I got an error when I wanted to see my app by pressing the "open app" button on the Heroku dashboard.
I am ignoring the database, which is Postgres, now. If I only care about the app without any data, I think I should be able to run the code on the Internet. Here is my source code on github, so I want you to check this out. Thanks so much in advance.
Here is the error message from Heroku.

Django Project is not hosting in Cpanel

Problem occuring
My Django project is not hosting on cpanel. I have created 2 app in my django project(Affiliate, members). app and project file
This message is showing in my domain when I hosted :
We're sorry, but something went wrong.
The issue has been logged for investigation. Please try again later.
Technical details for the administrator of this website:
Error ID:
9d01091b
Details:
Web application could not be started by the Phusion Passenger application server.
Please read the Passenger log file (search for the Error ID) to find the details of the error.
You can also get a detailed report to appear directly on this page, but for security reasons it is only provided if Phusion Passenger is run with environment set to development and/or with the friendly error pages option set to on.
For more information about configuring environment and friendly error pages, see:
Nginx integration mode
Apache integration mode
Standalone mode
Standart hosting providers doesn't support python or django. You should use ssh and manual installation.

Problem in hosting Django REST API on IIS

I was trying to host django REST API on IIS but it wasn't working properly. I worked with the same locally and it was working absolutely fine.
But when I hosted it on IIS then first of all its homepage with get method for all data from the database takes longer time to load and ended up with timeout error. And, when I tried to access other pages, the same problem occurred with them too. Only a page with post method opened but when I tried to submit data it raised an error.
I checked server configuration then I found that default error is timeout error. Now I am confused about why such things happened.
Can anyone please tell me if they faced similar issue or if they know some kind of compatibility issue or some prerequisite for hosting REST API using Django REST Framework? Or help me how can I find and fix the issue.
Are you using FastCGI? check the Authentication then try to disable windows authentication and enable anonymous authentication, try that if it will work.