Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
32 views

How do I use the symbol - symbol domain in nginx?(example-example.com)

I have a domain that has a - symbol (example-example.com) sign in it. I'm using nginx and getting a Bad Request (400) error. site-availble: server { listen 80; server_name do-main.ir; ...
user avatar
  • 1
0 votes
1 answer
32 views

How would I dynamically add servers to a load balancer?

This is a tough question to phrase in the limited space for the title, but I'll try my best to explain myself. I want the users of my website to be able to run the servers themselves. Those servers ...
user avatar
  • 1
1 vote
1 answer
48 views

Nginx behind Apache

I have an apache who is hosting websites one is 000-default.conf for www.domain1.com another one is domain2.conf for www.domain2.com and has a config like this <VirtualHost *:80> ...
user avatar
0 votes
1 answer
52 views

How to serve phpMyAdmin to localhost/phpMyAdmin instead of localhost:8080 using nginx in docker

In my project, I am using Django and nginx, but I want to manage my cloud databases through phpmyadmin. Django is working fine but I can't do the same with phpmyadmin because it is running in apache ...
user avatar
0 votes
2 answers
35 views

How to invoke a .env file into a Django project that runs in a Docker container on a K8s server?

I most likely only need a hint into the right direction. I have a docker container running a Django app using gunicorn and nginx. This Django app is currently getting its environment variables from a ....
user avatar
  • 159
0 votes
1 answer
397 views

Invalid HTTP_HOST header. NGINX config not preventing localhost invalid headers from IP port scanners hitting django

I am getting an Invalid Host header error from my server and I am unsure how to address it. The errors request URL is https://127.0.0.1:8000 and the obvious suggestion is to add localhost to my (using ...
user avatar
  • 1
0 votes
0 answers
41 views

How to Intercept and cache LDAP Search and Bind requests

I have a production web server running Django. Currently every request made requires an LDAP Bind and Search request. I can use the django-auth-ldap plugin to enable LDAP Search caching. However, my ...
user avatar
0 votes
0 answers
170 views

Error 502: Deploy Django application with Gunicorn and Nginx

I have developed a web application with Django and I am trying to publish it in a virtual machine created with Azure. To do that I'm using the following software stack: Ubuntu (20.04) Django (3.0.7) ...
user avatar
0 votes
0 answers
11 views

Pointing incoming HTTP from domain to django path?

I am hosting a website via Apache2 on Ubuntu 20, located in var/www/html which is the default that the user is sent to when accessing mysite.com. However, I am also hosting a Django webapp on mysite....
user avatar
0 votes
0 answers
9 views

Best server option for Django project [duplicate]

I have a Django on Postgres web application. It's a business management software. There are no serious calculations going on, but there's a lot of requests from a database. Right now it's running on ...
user avatar
  • 115
1 vote
1 answer
30 views

Reduce amount of network traffic by filtering attackers in AWS

just installed a simple django web application in an AWS EC2 instance. The instance is always on, but currently not used by anyone (it is still in development). Recently AWS is accounting lots of ...
user avatar
  • 113
0 votes
2 answers
63 views

Hosting two different django project in the same droplet with different subdomains (NGINX, Gunicorn, ubuntu)

As the title says I want to host two different django project in the same droplet (NGINX, Gunicorn, ubuntu) with different subdomains. One will be our main site example.com. which is up and running ...
user avatar
1 vote
1 answer
120 views

Why does Apache with mod_wsgi force a download of .py files instad of executing them?

Why does Apache with mod_wsgi force a download of .py files instead of executing them? I'm trying to run Django, but the first issue I have is .py files not executing. I'm following the docs here ...
user avatar
0 votes
0 answers
22 views

Apache2 add directory alias only for 2 of 4 server name alias

I have a .conf file for my Apache2 server. The thing is, I have 4 different subdomains pointing to the same application, but inside the VirtualHost tag I need a Directory with an alias that can only ...
user avatar
  • 1
-2 votes
2 answers
86 views

Hosting Multiple Django Websites on a VPS

I'm moving away from WordPress and into bespoke Django websites. I've settled on Django as my Python framework, my only problems at the moment are concerning hosting. My current shared hosting ...
user avatar
1 vote
1 answer
175 views

Supervisor not reloading Gunicorn properly with Django project

I am using Supervisor to reload Gunicorn when pushing Django project to production : Workflow : " && python manage.py migrate"\ " && python manage.py ...
user avatar
0 votes
0 answers
134 views

channels-Redis Consumes 100% cpu and becomes unresponsive

Ubuntu 20.04.3 LTS x86_64 channels-redis==3.2.0 Nginx -> Daphne -> redis/django command to start: "sudo docker run -p 6379:6379 -d redis:5" Django settings: 'default': { '...
user avatar
0 votes
0 answers
77 views

django rest nginx server static in port 8000

I am having trouble with showing uploaded media. when I hit this URL: http://localhost:8001/media/avatars/Max.jpeg the image is found, it's working great, but in django rest, it's showing my image url ...
user avatar
1 vote
1 answer
256 views

Apache: restrict serving images to authenticated users

I'm trying to figure out a way to restrict access to a media folder in my apache config. The folder takes uploads from from a Django site and image/pdf uploads are displayed in the site to ...
user avatar
  • 15
1 vote
0 answers
98 views

How to disable upstream buffering Nginx + Docker + Gunicorn?

I'm trying to use Nginx as proxy server between client and Gunicorn. Nginx, Gunicorn (Django) are Docker's containers. Problem is I can't disable buffering of upstream when I send large file from ...
user avatar
  • 11
0 votes
1 answer
118 views

connect() failed (111: Connection refused) when trying to reach 1 of 3 apps

I have two Django apps running on my Debian server with Gunicorn. One running on port 80(app1), the other on 84(app2). app1 is working fine. But when trying to open app2, I get a 502 Bad Gateway from ...
user avatar
  • 1
1 vote
0 answers
261 views

CORS is not working NGINX + DJANGO + REACT application

Existing nginx configuration given bellow. I tried in multiple way but nothing is working. server { server_name backend.xxxxxx.com www.backend.xxxxxx.com; client_max_body_size 100M; #...
user avatar
0 votes
0 answers
302 views

Getting a "403 access denied" after following tutorial

I followed the tutorial located here, Everything seemed to go as the tutorial said it would - except now I'm getting a 403 Forbidden error. I have nginx, gunicorn and django all installed. The nginx ...
user avatar
0 votes
0 answers
114 views

I am getting ”The term 'python' is not recognized…” error in Visual Studio

With this error I am not able to run my Django project. python: The term 'python' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name,...
user avatar
0 votes
0 answers
152 views

failed (13: Permission denied) nginx server with Django

I am getting permission denied error on nginx server, for CACHE folder created by django compressor, the error is "/home/xxxx/myproject/static/CACHE/js/output.dabd456b15d4.js" failed (13: ...
user avatar
  • 1
1 vote
0 answers
36 views

Response with and in memory file with Django and nginx

I have a piece of code that works fine on my local setup (Django embeded dev server running on Windows) but not on server (ubuntu + gunicorn + nginx) I build an Excel file et send it from memory like ...
user avatar
  • 111
0 votes
0 answers
117 views

Serving Django App with Apache 2 on Virtual Host

I am learning the Django framework and can run my first app on the development server using: python3 manage.py runserver However, what I really want to do is serve my app with Apache so it can be ...
user avatar
  • 179
0 votes
0 answers
11 views

Apache2 Redirect of django from .com to .one/.xyz

What I want to do is the following: I have a Django Site with different TLD (".com",".one",".xyz") pointing to same content.I am able to access individual site perfectly. ...
user avatar
2 votes
1 answer
185 views

Urls.py not updating on Django production server , which uses nginx and gunicorn

I am currently hosting a Django Webapp on an AWS EC2 instance, To run it in production mode I use NGINX and gunicorn. The Error that I am facing is: The production server doesnt seem to update urls.py,...
user avatar
  • 141
0 votes
0 answers
166 views

Django Vue.js Nginx POST request ERROR 502 (Bad Gateway), when using DRF API

I have deployed Vue.js and Django E-commerce on VPS, where I set up Nginx and Gunicorn. All pages are working fine, all pages from Vue.js and the Admin area of Django. But when it comes to use forms ...
user avatar
0 votes
0 answers
453 views

Google App Engine deploying django ModuleNotFoundError: No module named 'app.wsgi.application'; 'app.wsgi' is not a package

I have encounter this error '502 Bad Gateway nginx' when running a django app on google app engine. When I check the logs I got this Traceback (most recent call last): File "/layers/google.python....
user avatar
0 votes
1 answer
366 views

django.db.utils.DatabaseError: ORA-12154: TNS:could not resolve the connect identifier specified in OCI

django.db.utils.DatabaseError: ORA-12154: TNS:could not resolve the connect identifier specified within OCI repeatedly receiving errors connecting database ADW(autonomous database warehouse 19c) to ...
user avatar
0 votes
0 answers
675 views

Django / Gunicorn with Nginx reverse proxy - Wrong redirect to base path

I have a Django app successfully running with Gunicorn/Uvicorn, under a subpath of my domain (example.com/myapp). The Nginx vhost looks like this: server { server_name example.com; location /...
user avatar
  • 273
0 votes
0 answers
370 views

Ngnix + django +nodejs : Uncaught SyntaxError: Unexpected token '<'

This is first time using nginx and nodejs. I have two apps one is built using django and other is built using nodejs (expressjs +openvidu). I am trying to configure nginx, django app works fine, I am ...
user avatar
1 vote
1 answer
116 views

How can I setup multiple Django Apps using Supervisor (including Gunicorn and Nginx)? bind() to [::]:8090 failed (98: Address already in use)

I already deployed a Django/Wagtail App using Supervisor, Gunicorn and Nginx (on Debian Buster), so I can reach it with http://xx.xxx.xxx.xxx:8090. /etc/nginx/sites-available/cms server { ...
user avatar
  • 13
4 votes
0 answers
4k views

What is the nginx Variable for a custom Header?

A client is sending a custom HTTP Header X-ABC-LOGIN-NAME to my Nginx reverse proxy. To be sure that it is actually arriving, a PHP server (fastcgi) was installed and this header is really showing up (...
user avatar
  • 141
0 votes
0 answers
59 views

AWS S3 links return 403 when application is run using Docker Swarm, but works fine when run with Docker Compose

I have a Django application on EC2 (ubuntu) instance using S3 for static & media files, which is set up currently using Docker Compose. I'm trying to convert it to use Docker Swarm, but in doing ...
user avatar
0 votes
0 answers
382 views

No static files being served behind Nginx proxy manager

I managed to get a Django project fully op and running with Nginx,Gunicorn and Docker. If I run the container it's fully working when I access it via: http://containername.localhost:port localhost:...
user avatar
0 votes
0 answers
365 views

why am I getting error for nginx?

I have installed a new ubuntu and new nginx. However, I am created a nginx.conf file inside my website project folder and created a sym link as below ln -s <project>/nginx.conf /etc/nginx/site-...
user avatar
0 votes
0 answers
35 views

Linux partition sizes for a locally-deployed (via docker) django web application with postgresql database

I plan to deploy in an ubuntu server, via docker, a django web application with postgresql database in a local machine within a local network. I believe that docker volumes live in the /var/lib/docker/...
user avatar
0 votes
1 answer
1k views

Exception Value: relation "django_session" does not exist

I found a Django project and failed to get it running in Docker container in the following way: git clone git clone https://github.com/NAL-i5K/django-blast.git $ cat requirements.txt in this files ...
user avatar
0 votes
1 answer
3k views

Got django.db.utils.OperationalError: could not connect to server: Connection refused

I found a Django project and failed to get it running in Docker container in the following way: git clone git clone https://github.com/NAL-i5K/django-blast.git $ cat requirements.txt in this files ...
user avatar
0 votes
0 answers
27 views

Is the server running on host "dbi5k" (192.168.32.3) and accepting

I found a Django project and failed to get it running in Docker container in the following way: git clone https://github.com/hotdogee/django-blast.git $ cat requirements.txt in this files the below ...
user avatar
-1 votes
1 answer
1k views

django.db.utils.OperationalError: fe_sendauth: no password supplied

I found a Django project and failed to get it running in Docker container in the following way: git clone https://github.com/hotdogee/django-blast.git $ cat requirements.txt in this files the below ...
user avatar
1 vote
1 answer
1k views

Docker-compose IP address for Database

I found a Django project and failed to get it running in Docker container in the following way: git clone https://github.com/hotdogee/django-blast.git $ cat requirements.txt in this files the below ...
user avatar
-1 votes
1 answer
5k views

django.db.utils.OperationalError: could not connect to server: Connection refused

I found a Django project and failed to get it running in Docker container in the following way: git clone https://github.com/hotdogee/django-blast.git $ cat requirements.txt in this files the below ...
user avatar
2 votes
1 answer
1k views

Error: could not determine PostgreSQL version from '11.7'

I found a Django project and failed to get it running in Docker container in the following way: git clone https://github.com/hotdogee/django-blast.git I have the following Dockerfile: FROM python:2 ...
user avatar
0 votes
1 answer
153 views

Django caused Unable to connect with Docker

I found a Django project and failed to get it running in Docker container in the following way: git clone https://github.com/hotdogee/django-blast.git $ cat requirements.txt #psycopg2==2.6.0 # if ...
user avatar
1 vote
1 answer
499 views

How to pass multiple commands with Ansible docker_container

We have a Django container in which, at start, we need to run two different commands: python manage.py collectstatic --noinput and gunicorn myproj.wsgi We've tried all sorts of methods, but the result ...
user avatar
0 votes
0 answers
100 views

Apache and Django configuration

I implemented a Django project with MySQL backend. It runs well using python manage.py runserver. Apache seems installed well with no errors. I can access the default apache server. However, I couldn'...
user avatar

1
2 3 4 5
21