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
0answers
13 views

Deploying Django Application on Linux Server with Plesk

Please note: I have no previous experience deploying web applications on a server, and this is my first time. I have a Linux server with a Plesk and I am trying to deploy a Django app. I have tried to ...
-1
votes
0answers
9 views

Django nginx route 53 not redirecting to https but https is working

I have deployed a djago app on ec2 and connected domain with route 53. Everything is working very well. Also i have installed ssl and when i hit with this protocol, it works very well: https://www....
0
votes
0answers
38 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'...
0
votes
0answers
24 views

Port not opened in azure, how to fix that?

I am running django project on a azure ubuntu 18 machine. It runs on 8000 port. So I opened the port from security section of azure. And the firewall is inactive on that machine. But still, I can't ...
-1
votes
1answer
19 views

How two different applications should get served using one single apache2 virtualhost configuration

Just for assumption here testsite.com which is my php application and testsite.com/project is python application I have following settings in my apache site config file /etc/apache2/sites-available/...
0
votes
0answers
13 views

Unexpected 301 redirect in limited devices

I have an EC2 instance that hosts a Django app with Gunicorn and served by Nginx with following configuration. upstream app_server { server unix:/home/ubuntu/domain/app.sock fail_timeout=0; } ...
0
votes
1answer
39 views

ERR_CONNECTION_REFUSED I can not connect my Ubuntu Server

I have Ubuntu server that I am serving Django project. But I can not browse anything. I get ERR_CONNECTION_REFUSED error on all browsers. Server host, OS, and applications: Digital Ocean Ubuntu 18.04 ...
0
votes
1answer
84 views

Static files with Python, Apache (Proxy) and SSL [duplicate]

It's my first question in the community, i apologize in advance if I write something wrong I developed an application in Python (Django) and in the quality environment I am using gunicorn to provide ...
0
votes
0answers
27 views

Coworkers think latest Django 3.1.7 needs a mod_wsgi newer than the 3.4.18 provided by Centos 7.9

My coworkers are asking me why we are using the Centos 7.9 provided apache + mod_wsgi for the sake of Django 3.1.7 VERSUS hand assembling a custom build of either Centos 7.9's apache or a custom ...
0
votes
1answer
46 views

How to configure nginx proxy_pass to serve http images from https website?

I have django website and remote image storage. I want to proxy for example /images/ from django to server 10.0.0.40/images/. location /images/ { proxy_pass http://10.0.0.40/images/; } No errors ...
0
votes
1answer
44 views

Redirects from Nginx reverse-proxyed Django ASGI server going to wrong subdirectory

I'm trying to install Etebase in a subdirectory of my Nginx webserver. (I'm also running a Pi-hole dashboard on this server in a seperate subdirectory.) Etebase is a Django app using ASGI. I'm using ...
0
votes
0answers
21 views

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....
0
votes
0answers
39 views

Sendgrid sends email to spam due to DMARC failure in Django app

I am using AWS route 53 to register my domain for Django application. I have used my institutional email (e.g. sender-email@pxy.lp.dm) for domain registration. I want to use the same email address to ...
0
votes
0answers
15 views

Sendgrid domain authentication sends email to spam in Django

I am trying to send email from my Django application. For this, I have used Twilio SendGrid service. Though my application can send the email, it ends up in spam folder. So, I have followed this ...
0
votes
0answers
25 views

When is it necessary to use PGCrypto when developing a Django App with Postgres and publishing to Heroku?

Is it necessary to use PGCrypto to encrypt fields in our Django app? I ask because on the site it says that the data is encrypted at rest in an S3 bucket? Would we be covered then, in terms of data ...
0
votes
1answer
52 views

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/...
0
votes
1answer
46 views

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; ...
0
votes
0answers
57 views

Django nginx gunicorn ssl settings redirected you too many times

I have three Django websites and one of them which I try to redirect to SSL but i am getting below error instead. And cannot view the page. This page isn’t workingkodfanzin.com redirected you too ...
1
vote
1answer
60 views

Should my web server be accessible directly by its IP address, and how would I go setting that up?

Currently I have a Django server, which works normally if you go to www.notmyactualwebsite.com. However, I get a bunch of bot accessing the IP address directly, i.e. 12.34.56.78:443 to which Django ...
0
votes
0answers
37 views

Where can I find and access my vm django instance files?

I create a vm instance from marketplace called djangostack I can connect to the files on ssh button on Compute engine page! But how can I access the files of that django and re-write codes and do the ...
2
votes
0answers
123 views

Django + Gunicorn + Kubernetes: Website down few minutes on new deployment

I am having this issue with Django + Gunicorn + Kubernetes. When I deploy a new release to Kubernetes, 2 containers start up with my current image. Once Kubernetes registers them as ready, which they ...
0
votes
1answer
1k views

Invalid HTTP_HOST header. The domain name provided is not valid according to RFC 1034/1035

I am getting Invalid HTTP_HOST header error on my server. I don't understand why it's happening and how to fix it. Everytime it happens backend stops working and I have to restart the server. Any help ...
1
vote
0answers
119 views

Nginx stopped and failed to restart - open() “/run/nginx.pid” failed

I am running my django apis, deployed on Ubuntu 18, on Nginx and running via Supervisor. I am using Certbot for SSL certs and this is the only web service running on this webserver. No other websites ...
1
vote
0answers
43 views

sqsd failing on Elastic Beanstalk worker with network/SSL issues

I have recently, simultaneously upgraded an Elastic Beanstalk worker application on several fronts; from Amazon Linux 1 to 2, Django 2.0 to 3.1, Python 3.6 to 3.7, Apache to Nginx, so there have been ...
1
vote
1answer
149 views

Django Channels + Apache + Docker performance stuck to 10rq/s

Setup I have configured Django Channels inside a docker container on server Ubuntu 20.04 OVH VPS (8vCore, 16Go RAM). To run django-channels I used daphne. Versions: Django==3.1.4 channels==3.0.2 ...
0
votes
1answer
51 views

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 to: https://docs....
0
votes
0answers
142 views

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. ...
0
votes
0answers
12 views

I not see changes on my Django project

I have the server Nginx+uwsgi. Uwsgi working as emperor. After I change py file in vassal Django project. In production nothing changed. I try to touch vassal ini file in turned on master, but aslo ...
0
votes
0answers
173 views

failed (111: Connection refused) while connecting to upstream

Using AWS EC2 Logs nginx-proxy | nginx.1 | rkfootwear.in 49.36.35.208 - - [17/Dec/2020:05:34:00 +0000] "GET / HTTP/1.1" 301 169 "-" "Mozilla/5.0 (Windows NT ...
0
votes
1answer
30 views

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 - ...
1
vote
0answers
50 views

Production server much slower then local test server when sending large request

I am running a django app and I am trying to send an API POST-request which is pretty big to my production server. Now the problem is that what takes 4 seconds locally takes 1 minute in production. ...
0
votes
1answer
228 views

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 -...
0
votes
1answer
77 views

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 ...
0
votes
1answer
33 views

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 ...
-1
votes
1answer
406 views

Running django and gunicorn on raspberry pi

So I am trying to follow this here: https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04 except on the latest raspberry pi. I think ...
0
votes
1answer
94 views

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 ...
0
votes
0answers
4k views

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 ...
0
votes
0answers
473 views

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&...
0
votes
0answers
21 views

how to configure Aapahe mod-wsgi for python 3.6 which is by default configured with python 2.7?

Hye everyone.. I have installed Python 3.6 and created a virtual environment and installed all required libraries including Django in that virtual environment. I want to host a django application on ...
1
vote
2answers
944 views

nginx disable directory browsing not working

I have a Django application in production and my web server is Nginx. My application is located at /home/rouizi/blog and let say my domain name is example.com. I want to prevent that users can read my ...
-1
votes
1answer
392 views

Docker nginx Cannot start service

I am running docker and with that I am using nginx and cant start server on localhost full tracktrace ERROR: for nginx Cannot start service nginx: driver failed programming external connectivity on ...
1
vote
0answers
21 views

Cannot access Django application using Gunicorn and NGINX on Ubuntu 18

I cannot access my django application on my public site. I am running Gunicorn with gunicorn --workers 3 --bind unix:/webapps/pcfnet/paulcflynn/pcfnet/pcfnet.sock pcfnet.wsgi:application and my NGINX ...
1
vote
1answer
973 views

How to enable/load mod_wsgi in apache server in centos 8 VPS

I am not able to enable/load module mod_wgsi in apache webserver in cent os 8 VPS. It works very easily in ubuntu by running the command sudo apt install libapache2-mod-wsgi-py3 Please Help me getting ...
0
votes
0answers
49 views

Django and Nuxt hosting with DigitalOcean

I have a django application which runs a REST framework API which is consumed by a separate Nuxt (Vue) application for the frontend. The django app needs a postgres database and I have a celery ...
0
votes
0answers
503 views

nginx error - recv() failed (104: Connection reset by peer) while waiting for request

I've been unable to find exactly this error and without significant experience I'm unable to extrapolate a solution from similar questions that usually infer fastcgi issues that don't seem to apply ...
0
votes
1answer
42 views

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 ...
0
votes
0answers
33 views

Django 2.2 + Apache24 + Windows Server 2016, mod_wsgi unable to run wsgi.py file

I am trying to deploy a django project on a windows machine using Apache 24. Apache works. But the log file shows that mod_Wsgi is stuck while reading the wsgi.py file without throwing any error: Here ...
0
votes
0answers
150 views

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 ...
0
votes
0answers
155 views

Swagger UI not working after renewing Let's Encrypt Certificate

I have a server deployed with a backend using Django and a Docker + nginx container. The backend is accessible, all the API paths (using djangorestframework) work too, but the Swagger UI shows invalid ...
0
votes
1answer
202 views

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 virtualenv. CONDA_SRC=/home/justin/...

1
2 3 4 5
20