Django, "the web framework for perfectionists with deadlines", is a Python-based framework for creating web applications. With a powerful object-based database mapper, a clean syntax for mapping URLs to views, a simple template language and a convenient automatically generated administration interface, Django is the most popular of the Python web frameworks.
Questions tagged [django]
1012 questions
0
votes
0 answers
NGINX - django subdomain proxy_pass keeps redirecting
I'm trying to add subdomain news.abc.com for my django application and forward it to example.com/news/
And NGINX keeps redirecting whatever i do.
My current config is
server {
server_name news.example.com www.news.example.com;
location / {
…

Evgeny Malkov
- 101
- 2
0
votes
1 answer
How to point static folder in Nginx for a Django application
I have deployed a simple Django application in the AWS server and created a config file in the Nginx as follows. But its static files are not detecting.
Location of my static folder location: /path/static.
This application checks for static files by…

aks
- 57
- 2
- 7
0
votes
1 answer
How to write nginx proxy pass for the Django application
I have deployed a simple Django application in the AWS server and created a config file in the Nginx as follows.
server {
listen 80;
server_name 127.0.0.1;
…

aks
- 57
- 2
- 7
0
votes
1 answer
Nginx - Faking host Header
Django apps rely on the host header for certain links etc.
In my setup I have a django app running behind nginx as reverse proxy (with a non-default server_name)
According…

ProfHase85
- 501
- 3
- 6
- 15
0
votes
0 answers
AWS EC2 - 1/2 checks passed Error. Instance reachability check failed
I have a Ubuntu-20.4 ec2 instance. In that, I'm running a Django Application connected with Apache Server. I created this instance 20 days back and have never stopped the instance until yesterday. Suddenly today I cannot start the instance because…

Kaushik Ganesan
- 1
- 1
- 1
0
votes
1 answer
How is nginx treating API requests?
In the process of my question here Production server much slower then local test server when sending large request I am trying to understand more profoundly what a webserver - especially nginx - actually does. Basically I want to understand better…

Micromegas
- 231
- 3
- 12
0
votes
1 answer
Why is my virtualenv not activated by uwsgi?
On a fresh install of Debian Bullseye I am unable to use the uwsgi command. It fails to load the requested virtualenv.
This is the command that fails:
uwsgi --plugins http,python3 --wsgi-file wsgi.py --http :9090 --virtualenv…

Jaap Joris Vens
- 601
- 3
- 8
- 20
0
votes
1 answer
service apache2 start causes error in django
On running
apache2 configtest
I get
Syntax error on line 2 of
/etc/apache2/sites-enabled/firstweb.conf: Invalid command
'WSGIScriptAlias', perhaps misspelled or defined by a module not
included in the server configuration Action 'configtest'…

Ved Nig
- 1
0
votes
1 answer
If you wan't to send emails to subscribers, what benefits does an SMTP server have over Gmail?
Let's assume I have a website with an active community. The interactions of my community makes me want to send 1000 Emails a day to some subscribers. Would a gmail account succeed at this task? From what point would it be wise to invest in a SMTP…

Artur Müller Romanov
- 125
- 4
0
votes
1 answer
Apache, mod-wsgi: Any URL is served by project, ServerName is ignored
I am setting up a Django project and Apache on Ubuntu 20. The below setup correctly displays the Django project, however ANY URL that points to the server's IP address is served this project. I obviously need to limit this to my particular website…

user984003
- 101
- 1
- 1
- 2
0
votes
0 answers
WebSocket connection to 'wss:// failed: Error during WebSocket handshake: Unexpected response code: 404 on channels
I face this error while using channels for WebSockets on django production:
WebSocket connection to 'wss://domain.me/ws/orders/confirm_all/' failed: Error during WebSocket handshake: Unexpected response code: 404
while there's no problem on…

MeHDI RH
- 1
- 1
- 2
0
votes
0 answers
Setting up a Django + Postgres + PgBouncer through Docker
I have an existing Django app where Django runs in a Docker container (served through uvicorn), and Postgres runs in another Docker container.
In my settings.py I have
DATABASES = {
"default": {
"ENGINE":…

Titandrake
- 101
- 1
0
votes
1 answer
systemctl start nginx doesn't do anything
if I do systemctl start nginx, it just goes to the next empty line, without letting server to work, like so:
[[/home/sc/pro]]# systemctl start nginx
[[/home/sc/pro]]#
if I do nginx -t:
nginx: the configuration file /etc/nginx/nginx.conf syntax is…

user590950
- 1
- 1
0
votes
0 answers
How to redirect a client after sending 401 Unauthorized?
I've found out that due to the way HTTP Basic Authentication works I need to unauthorize a client in order for the browser to forget the session id. I found a way to do that but I still need to send log out query after unauthorization. I changed the…

Malazzar
- 21
- 3
0
votes
1 answer
Conda, Django, Gunicorn and Supervisor bad interpreter: No such file or directory
I'm following this tutorial to deploy my Django app, but modified my executable /var/www/my_django_project/bin/gunicorn_start to use my conda env instead of…

Soubriquet
- 101
- 2