Questions tagged [django]
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.
1,031
questions
-1
votes
1
answer
44
views
Mysql Error 1045 Access Denied: Using Password: FALSE
I'm using MySQL v8.0.35 with django and python. A website is used to access the database with both the website and database hosted on AWS.
When the website tries to access the database in any way, it ...
1
vote
1
answer
52
views
Django + Nginx + Gunicorn - Static files not found
I'm using Django+Gunicorn+Nginx for my web application in a Ubuntu 22.04.4 server. I followed this guide until the end and my web is running in production. However, static files are not working (css, ...
0
votes
0
answers
78
views
Django site is not opening up on Digital Ocean Ubuntu droplet
We have been using this server for an year already as our Django application development server but it stopped launching the site on whatever port we start the application. Digital Ocean hosting ...
0
votes
0
answers
79
views
502 Bad Gateway after SSL installation on Nginx and Django
I have a 502 error on my vps after I installed SSL certificate.
systemctl status nginx.service:
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/...
-1
votes
1
answer
81
views
System slow to respond to request. What to do?
I have an application container behind an Nginx reverse proxy. When I access the application via https, the POST request returns 302 and then the GET returns 200. See
monitoring via browser:
Request ...
0
votes
0
answers
43
views
Putting a Django application into production on Ubuntu server with Apache2 and Cloudflare
I have this Django application which works very well, but I do not understand at all, how to put it in production on a Ubuntu 22.04 LTS server using apache2 and to link it in HTTPS, on a domain such ...
0
votes
0
answers
45
views
Django: CONN_MAX_AGE persists connections, with gthread worker class of gunicorn
I am using Django, without MAX_CONN_AGE setting (default = 0), this leads to creation of connection in each request, and connection is not reused in django ORM.
This is causing multiple postgres ...
0
votes
1
answer
193
views
Django uwsgi behind haproxy: http or http-socket?
I've a Django app inside a docket that uses uwsgi.
Since we have several Dockers running on different machines we have haproxy as load balancer.
My question is: should I use uwsgi with http or http-...
0
votes
0
answers
37
views
uWSGI with nginx bad gateway error
So I'm trying to host my django app with nginx and uwsgi but i keep running into a 502 bad gateway error. I have the following nginx config.
upstream django {
server unix:///home/david/...
0
votes
1
answer
85
views
www-data nginx permission django no read access
I followed this guide to setup my Django application to work with my nginx webserver. However upon testing I discovered that www data group did not have access to my applications static files and ...
0
votes
2
answers
160
views
Getting Reverse Proxy to work
I have a Django web app sharing external ports 80 and 443 with another server. localhost works fine without the reverse proxy, but when it is enabled, I run into all kinds of errors.
How to make ...
1
vote
2
answers
119
views
Django app hosted in Apache running on Windows - service won't start
I've found many similar articles with similar issues, and a couple of them concluded the Apache service just cannot be run at all for my situation. However I did get the service to run -- only it ...
0
votes
0
answers
133
views
Proxy error: /var/run/rpc/xmlrpc.sock (localhost) failed
I'm inheriting this old Django project hosted on an EC2 instance. It used to run on Heroku and used a Proximo proxy in front of gunicorn. Now it just runs a systemd script with the following:
...
0
votes
1
answer
87
views
Vue + Django REST + traefik = page not found
I am modifying djangocookiecutter to meet my requirements. I have Vue + Django REST
production.yml
version: '3'
volumes:
production_postgres_data: {}
production_postgres_data_backups: {}
...
0
votes
0
answers
146
views
Django on EC2 can't connect to RDS (Same VPC, same subnets)
i set up this environment on AWS:
VPC:
1 Public subnet
Route table with Internet Gateway
2 Private subnets
Route table with NAT
I created a subnetgroup with the private subnets and attached it to ...
0
votes
0
answers
24
views
How to configure Apahce with websocket through python daphne DJango on EC2 server
Below is my virtual host for running python
<VirtualHost *:8000>
DocumentRoot /var/www/VITSBACKEND
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log ...
0
votes
1
answer
64
views
Apache Bad Request (400) and time shift in logfile
My web server utilizes Apache and Django for its web service. Occasionally, the web service produces a "Bad Request (400)" error. After reviewing the error log, I noticed that there is a 6-...
0
votes
1
answer
113
views
Postfix rejecting my email from a "Contact Us" form, with "SMTPRecipientsRefused"
I made a "Contact Us" form in Django, and the Django part of it seems to be working. But sending of the email it generates fails with
SMTPRecipientsRefused at /contact/
{'[email protected]'...
1
vote
1
answer
76
views
nginx Expires header based on mime type for proxied content?
My setup uses a map to define different Expires headers for various static files (based on their mime type). For proxied content (uwsgi_pass), I use a static Expires header:
map $...
1
vote
1
answer
392
views
Why is docker compose failing with " ERROR [internal] load metadata for docker.io/library/python:3.11.6-alpine3.18 "?
I'm new to docker, trying to build a website by following a online course but i was struck with this error in the beginning itself
FROM python:3.9-alpine3.13
LABEL maintainer="rohitgajula"
...
1
vote
0
answers
393
views
STATIC files not found when running Django app in development
I'm currently training in the Django framework and am attaching a CSS document to an HTML document.
All pretty straight forward staff.
Except it apparently isn't. Hardly surprising really.
Can anyone ...
0
votes
0
answers
133
views
Development Server Failing to see CSS Files | Django
Right, being a Python & Django student using VSC so therefore, in the interest of not having a nervous breakdown here, how on earth do other VSC users import CSS files into their HTML/PHP ...
1
vote
1
answer
288
views
Having difficulty connecting to PostgreSQL with Django hosted on IIS
Trying to host Django 4 app with PostgreSQL database on Windows Server 2016 with IIS manager 10 and httpPlatformHandler 1.2.
The app and database work without issues when running on a VM server with ...
0
votes
1
answer
175
views
Error 404 Message | Django | PyCharm
Right, is there any particular valid reason as to why - despite me doing everything correctly - do I get the error 404 message when I deploy my development server (on port 8000) from PyCharm?
This is ...
0
votes
0
answers
32
views
ValidationError on formset after user stopped POST request with browser goback
I have a django admin form containing a multiple files field and some inlines formsets after.
When user's connexion is slow, it happens they close the page or go back to the previous page (no patience ...
0
votes
1
answer
151
views
Running php and django on two subdomains
My friends and I have made a project which is made out of two parts. One is made in Django and other one is made in php language. We have just one server so we want to use 2 subdomains. My question is ...
0
votes
0
answers
193
views
Django: Configuration for serving static files on IIS server
I have a django application deployed on an AWS IIS server. Static fils are served just fine via 'runserver', but not via the IIS server. I have done everything right but it doesn't work. i even tried ...
0
votes
0
answers
131
views
How can I enable mod_wsgi in Apache2.4.57.0 on Windows?
Apache/2.4.57 (Win64)
Django 2.4.2
I am new to Django and I tried to connect it with Apache through mod_wsgi but it seems new versions of Apache does not support such kind of module. I installed ...
0
votes
2
answers
81
views
Apache virtualhosts conf let wrong servername requests going through proxy
I have moved a server configuration to a new server and at the same time configured it with apache mod_proxy to access a gunicorn/django webserver (inside a docker container on port 8000). Previous ...
0
votes
0
answers
130
views
Do I need to use an Nginx reverse proxy between AWS Application Load Balancer and Gunicorn running in Fargate?
I have a Django backend application running with Gunicorn inside a Docker container in Fargate.
Since I'm not serving any static files from the Django server (they are being served via Cloudfront) do ...
0
votes
1
answer
360
views
Access errors passing traffic from nginx to daphne server
I've got a GKE private k8s cluster with nginx and a django application running with wsgi and asgi. Logs from nginx show that websocket requests get a 403, and the logs on the daphne pod are showing &...
0
votes
1
answer
94
views
mailman3 - css files of hyperkitty placed in wrong directory
I have installed mailman3 and followed this instruction: https://lab.uberspace.de/guide_mailman-3/
My problem is, that css files for HyperKitty (and the login screen) are not available. If I'm on ...
0
votes
1
answer
305
views
Nginx doesn't see or use subdomain config
Problem: nginx doesn't apply configuration for subdomain if there are domain and subdomain config at the same time.
Disclaimer: I'm new to nginx and server deployment.
Question:
What I do wrong with ...
1
vote
1
answer
559
views
Django CSRF verification failed after setting SSL with Certbot
I'm currently working on a Django project that utilizes Docker, and I recently set up an SSL certificate using a containerized version of Certbot in order to secure my Django app through HTTPS. ...
0
votes
0
answers
121
views
403 FORBIDDEN APACHE django
Apache/2.4.54 (Win64) OpenSSL/1.1.1p PHP/8.1.12 mod_wsgi/4.9.4 Python/3.11 Server at localhost Port 80
I am trying to run my django project on my windows machine.. in apache this the configuration i ...
1
vote
0
answers
491
views
100 concurrent requests to a Django-App with Gunicorn lead to "54: Connection reset by peer" and 502's
I'm hosting a Django-App which serves as an API-Endpoint. Unfortunately the App which uses the API does a lot of concurrent requests on page-load (in the realm of 80-90 requests).
Nginx is running as ...
0
votes
0
answers
279
views
unable to find django error when running django app through apache2
I am trying to get a django app running on a apache2 server both on a raspberry pi for a project of mine. The appache server is running but I can't pull up the web page as I just get an "Internal ...
0
votes
1
answer
194
views
Connect Redis Unix Domain Socket to Django
I have a Django website running via nginx under user www-data and gunicorn under user myuser bound at /run/gunicorn.sock.
nginx works just fine; it acts as a proxy to the gunicorn Unix domain socket. ...
0
votes
1
answer
1k
views
Gunicorn quits without notice
I'm deploying a django/nginx/gunicorn site and am following this guide while doing so. Following the subheading "Final Steps for Production Deployments", I've created a production gunicorn ...
2
votes
1
answer
141
views
get request problems while running nginx + gunicorn + django-plotly-dash
The web site is running, Gigicorn has multipule workers.
For some reason the url_calling : http://web?id=value
the id=value do not propagate coherently, (sometimes it works, but most of the time it ...
1
vote
1
answer
2k
views
Connecting to hosts postgresql from django app running in a docker container
I am trying to connect to my hosts postgresql server (version 14) from my django app running in a docker container.
here are my settings
docker-compose.yml:
version: '3'
services:
web:
build: ...
0
votes
1
answer
1k
views
Best way to config gunicorn and nginx with django?
I am trying to deploy django with gunicorn and nginx on heroku, and i'm kinda confused with the way to config gunicorn and nginx, when i searched through internet, they usually create gunicorn.socket
[...
0
votes
0
answers
50
views
How to generate embedded element for other site to consume?
If I put a link on a comment on Twitter, facebook and other place the website analyse the link and show a small preview of the link if possible. It could be a small player for a video or an image with ...
4
votes
2
answers
4k
views
Redis cannot bind a specific ip address?
I'm new to redis, but I want to set one up on my Raspberry Pi 4 (RP) for using it in a Django application (with celery).
On my RP I have installed a firewall, ufw, and allowed incomming traffic from ...
0
votes
1
answer
2k
views
connection refused django gunicorn nginx
I am getting following error when running search feature on my site (search feature makes api request to my api server):
2022/08/31 21:01:56 [error] 726#726: *23 connect() failed (111: Connection ...
1
vote
0
answers
431
views
Page not found (404) error. "The current path, dashboard/auth/login/, didn’t match any of these."
I'm attempting to get Devstack and Horizon working on Ubuntu 20.04.
Devstack seems to install OK. I'm following the steps: All-In-One Single Machine, DevStack Networking, (Horizon) Quickstart, and ...
6
votes
3
answers
7k
views
Using Nginx to Block Connections that aren't addressed to my domain
I am running a django app on AWS elastic beanstalk and I'm getting spammed by bots trying to scan for vulnerabilities. It results in a flood of errors such as:
(Where xx.xxx.xx.xx is my ec2 instance's ...
0
votes
0
answers
319
views
Apache Reverse Proxy using mod_proxy
0 Introduction
I'm trying to setup a server with a main website hosted on ports 80 and 443 (let's call it example.com) and a section on this website that serves umami analytics hosted on port 3000 (...
0
votes
1
answer
2k
views
Configure two application in same server in Nginx on two ports
I have two different applications.
Survey application built with express framework
Django application using rest api and react
I would like to achieve:
vardhan.com/survey, vardhan.com/feedback, etc ...
1
vote
2
answers
1k
views
AWS application can't connect to external API without public IP address
I have a Django application that's running on AWS EC2. That application occasionally makes requests to an external API (stripe.com). I tested it extensively and it passed all my tests. When I deployed ...