nginx

Django admin csrf token not set

Django admin csrf token not set Question: I have a Django project working locally with login to the admin portal working. Once the project has been deployed to our development environment the pages that do not require CSRF authentication are viewable, but the admin portal returns a CSRF token error when attempting to login. Error …

Total answers: 2

NGINX Configuration Issue: One Domain Works, Another Doesn't

NGINX Configuration Issue: One Domain Works, Another Doesn't Question: I’m facing an issue with my NGINX configuration where one of my domains works correctly, but the other doesn’t. I have two domains (domain1.site and domain2.site) with their respective configurations in NGINX. Here’s the NGINX configuration for domain1.site: server { listen 80; server_name domain1.site www.domain1.site; return …

Total answers: 1

Runging own Telgram bot based on PTB 13x and local Telegram bot API behind nginx

Runging own Telgram bot based on PTB 13x and local Telegram bot API behind nginx Question: Try to use local Telegram bot API to take benefits of larger files for my bot serving and helping users in supergroup with files as described here Build stack with Telegram Bot API, nginx as reverse proxy and my …

Total answers: 1

uWSGI Segmentation Fault With Flask/Python App Behind Nginx After Running for ~24 hours

uWSGI Segmentation Fault With Flask/Python App Behind Nginx After Running for ~24 hours Question: Problem I have a Python/Flask app running in prod with uWSGI behind Nginx that deploys my personal projects via Docker. It works great for about 12-24 hours when it suddenly starts segfaulting. The app accepts requests and starts a Python thread …

Total answers: 1

docker nginx django gunicorn not serving static files in production

docker nginx django gunicorn not serving static files in production Question: Trying to deploy website with nginx + gunicorn + docker + django. But ngingx isn’t serving static files. Following are the configurations: Django project structure settings file production.py STATIC_URL = "/static/" """STATICFILES_DIRS = ( os.path.join(BASE_DIR, ‘static’), )""" STATIC_ROOT = "/app/forex/static/admin/" Docker file for nginx …

Total answers: 1

502 Bad Gateway in GAE with Django, & Log say "libBLT.2.5.so.8.6 No such file or directory"

502 Bad Gateway in GAE with Django, & Log say "libBLT.2.5.so.8.6 No such file or directory" Question: Django 4.0.4 Python 3.8.9 I deployed Django App to GAE. But I got "502 Bad Gateway" error. And I checked server logs. That is below. Traceback (most recent call last): File "/layers/google.python.pip/pip/lib/python3.8/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker worker.init_process() File …

Total answers: 3

How to find my current nginx.conf file from the AWS EC2 Enviroment

How to find my current nginx.conf file from the AWS EC2 Enviroment Question: I need to modify nginx.conf to increase client_max_body_size . On the AWS docs . Here they are giving an example of how to modify the configuration . but they are doing a lot more things that I don’t want to do that. …

Total answers: 1

How to download file using django as backend and nginx

How to download file using django as backend and nginx Question: I have a filefield in a document model from which i can upload files like this document=models.FileField(max_length=350 ,validators=[FileExtensionValidator(extensions)]) uploading is working good, now i want to implement download feature for the frontend, but only those files which are uploaded by the user. using url …

Total answers: 1