All Questions
368
questions
1
vote
1
answer
39
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 $...
0
votes
0
answers
111
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
233
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
200
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
385
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
445
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
330
views
cors policy blocking request from my docker django nginx app
I am trying to make a POST request from my React app deployed locally to my dockerized Djano app deployed in Google Compute Engine. I am receiving this error:
Access to XMLHttpRequest at 'http://X.X....
0
votes
1
answer
895
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
126
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 ...
0
votes
1
answer
840
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
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 ...
6
votes
3
answers
6k
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
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
1
answer
707
views
Nginx redirects to ```https://server_name/ ```URL instead of ```https://server_name/projectname/``` , after changing the URL from http to https
I have a couple of URLs like https://server_name/projectname/, now the problem is if I type this URL on the browser, Django (or Nginx) redirects me to https://server_name/, which does not exist. ...
2
votes
1
answer
3k
views
NGINX not Serving Image Files Properly
I have set up a django website that would be served by Nginx, everything was working perfectly not until images stopped showing recently.
I tried inspecting the possible cause of this strange ...
1
vote
1
answer
81
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>
...
0
votes
1
answer
743
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 ...
2
votes
1
answer
6k
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 ...
0
votes
0
answers
2k
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)
...
0
votes
2
answers
564
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 ...
-2
votes
1
answer
806
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 ...
1
vote
0
answers
399
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 ...
0
votes
1
answer
846
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 ...
2
votes
0
answers
715
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;
#...
0
votes
0
answers
1k
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 ...
1
vote
0
answers
667
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: ...
1
vote
0
answers
164
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 ...
2
votes
1
answer
784
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,...
0
votes
0
answers
2k
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 /...
0
votes
0
answers
1k
views
Nginx + 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 ...
1
vote
1
answer
513
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 {
...
6
votes
0
answers
17k
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 (...
2
votes
1
answer
7k
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
1
answer
2k
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
1
answer
466
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
0
answers
326
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
1
answer
770
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
1
answer
4k
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;
...
1
vote
1
answer
115
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 ...
9
votes
3
answers
20k
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
0
answers
1k
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 ...
0
votes
1
answer
1k
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
1
answer
103
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
0
answers
957
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
1
answer
2k
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 ...
1
vote
2
answers
3k
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
1
answer
3k
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
0
answers
139
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 ...
0
votes
1
answer
156
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
0
answers
1k
views
POSTGRESQL and Django app: could not receive data from client: Connection reset by peer
I am running a django app with postgresql, nginx and gunicorn. I have a script where data is pulled from one table in the DB, modified and then needs to replace the existing data in that one table. In ...