Django Postgresql Angular deployment giving 500 error

#1
I have been trying to deploy a web app which uses django and drf with postgres db api with an angular front end on an ubuntu vps but without success.

I have installed all the necessary dependencies and have set up a virtual environment.

I am hosted on Hostinger and used the Ubuntu 22.04 with django OLS image provided by them. However, when I upload my django backend to the lsws directory and configure a virtual host, I am getting a 500 error.

I have copied the settings from the Example virtual host (changing the directory locations as necessary)

I have followed the tutorials (I could find) but they are not consistent with the Example app setting.

Is there a clear tutorial for configuring a virtual host for a django api? Should I be using 'App Server' or 'LS SAPI' context?
 
Last edited:
#3
I have been trying to deploy a web app which uses django and drf with postgres db api with an angular front end on an ubuntu vps but without success.

I have installed all the necessary dependencies and have set up a virtual environment.

I am hosted on Hostinger and used the Ubuntu 22.04 with django OLS image provided by them. However, when I upload my django backend to the lsws directory and configure a virtual host, I am getting a 500 error.

I have copied the settings from the Example virtual host (changing the directory locations as necessary)

I have followed the tutorials (I could find) but they are not consistent with the Example app setting.

Is there a clear tutorial for configuring a virtual host for a django api? Should I be using 'App Server' or 'LS SAPI' context?
You should use 'App server' refer this.
https://openlitespeed.org/kb/python-wsgi-applications/#Requirements
 
Top