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.

1012 questions
6
votes
1 answer

How to have apache handle .well-known/acme-challenge and still have / passed to wsgi

In order to support automatic LetsEncrypt certificate renewal certbot uses the --apache handler. e.g. certbot renew --apache This handler installs a temporary VirtualHost for */.well-known/acme-challenge/ on the Apache server in order authenticate…
Jay M
  • 378
  • 4
  • 11
6
votes
4 answers

How do I implement SSL on a private IP?

I am developing a network management product. We ship our product to customers as a VM, which they install on a hypervisor in their network. These VMs are given static, private IP addresses in the customer network. They monitor the customer's…
BThompson
  • 191
  • 1
  • 1
  • 7
6
votes
1 answer

Django with Apache and mod_wsgi: no system log unless setting Debug = True

I'm using apache web server and mod_wsgi to transfer request to django. $ apache2ctl -v Server version: Apache/2.4.10 (Raspbian) Server built: Sep 17 2016 16:40:43 I'm using this apache site to declare django app: ServerName…
Thomas
  • 61
  • 1
  • 1
  • 5
6
votes
2 answers

Django doesn't find CSS files for admin pages using uWSGI

Even if I followed the official instructions, when I start a Django test site using uWSGI, CSS files for the admin interface are not loaded. If I open the URL of a CSS file, for example http://localhost:8443/static/admin/css/base.css, I get a 404…
Marco Sulla
  • 207
  • 2
  • 4
  • 15
6
votes
1 answer

Storing secure keys on Ubuntu web server

I'm running Ubuntu 12.04 Precise with a DUNG (Django, Unix, Nginx & Gunicorn) environment and my app (as well as various config files) is stored in a python virtual environment inside /srv, which the www-data user has access to. The nginx & gunicorn…
Sencha
  • 313
  • 2
  • 5
6
votes
2 answers

nginx+django serving static files

I have followed instruction for setting up django with nginx from the django wiki (https://code.djangoproject.com/wiki/DjangoAndNginx) and have nginx setup as follows (a few name changes to fit my setup). user nginx nginx; worker_processes …
avalore
  • 63
  • 1
  • 1
  • 3
6
votes
1 answer

Install problems with XSendFile on Ubuntu

I installed the apache dev headers: sudo apt-get install apache2-prefork-dev Downloaded and compiled the module as outlined here: http://tn123.ath.cx/mod_xsendfile/ Added the following line to /etc/apache2/mods-available/xsendfile.load: LoadModule…
Dan
  • 61
  • 3
6
votes
3 answers

Development, Testing, Staging and Production model

I'm developing a run of the mill django powered website with a Postgres database. I develop locally and have 3 VPS servers for Testing, Staging and Production. Each VPS runs their own Linux / Apache / Python / Postgres stack, with it's own…
oliland
  • 163
  • 1
  • 7
6
votes
3 answers

Is it possible to run automatically celery at startup?

I have python server based on django and celery. Each time computer restarts, apache2 starts so my server is working, BUT I have to restart celery manually (going to my project directory and executing "python manage.py celeryd"). What is the correct…
user35348
6
votes
3 answers

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 ip address.) DisallowedHost at…
Del
  • 163
  • 1
  • 4
6
votes
0 answers

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 (with a value) in phpinfo(), section 'PHP…
TMOTTM
  • 161
  • 1
  • 1
  • 4
5
votes
2 answers

Django App Public IP Works but `400 Bad Request Error` when A Record Update

I've got a Django application deployed on an Ubuntu 16.04 EC2 instance using nginx and gunicorn. Unfortunately, after a successful deployment with my public IP, updating my A record with the public IP yielded a 404 Bad Request error at my…
twknab
  • 201
  • 2
  • 7
5
votes
3 answers

Docker how to Django + uwsgi/gunicorn + nginx?

I can't get my head around on what's the "correct" way to deploy a Django project that uses uwsgi/gunicorn (I haven't decide yet what to use, probably uwsgi since it has better performances, suggestions?) and nginx using docker. I saw that some…
EsseTi
  • 255
  • 3
  • 13
5
votes
2 answers

Docker cannot access Webserver on host

I'm trying to setup pythons django inside a dockerized environment Dockerfile FROM python:3.5-slim ENV PYTHONUNBUFFERED 1 RUN mkdir /code RUN pip install --upgrade pip WORKDIR /code ADD requirements.txt /code/ RUN pip install -r requirements.txt ADD…
xhallix
  • 243
  • 2
  • 8
5
votes
3 answers

Nginx & uWSGI: ImportError: No module named site

I'm receiving an error: ImportError: No module named site according to my uWSGI log. test_proj.ini: [uwsgi] chdir = /home/%n/app module = %n.wsgi home = /home/%n/app/venv master = true processes = 10 chmod-socket = 664 socket =…
koralarts
  • 261
  • 1
  • 3
  • 11