Questions tagged [mod-wsgi]

The mod_wsgi module is a python WSGI adapter module for Apache.

The mod_wsgi module is a python WSGI adapter module for Apache. For details on the official channel for getting mod_wsgi help, see http://modwsgi.readthedocs.io/en/develop/finding-help.html.

3241 questions
1
vote
0 answers

mod_wsgi psycopg2 importerror datetime initialization error

Everything runs perfectly if I use manage.py runserver but the moment I deploy using apache+mod_wsgi i get ImportError: datetime initialization failed. Environment details CentOS 6 Apache/2.4.6 Python 3.5.1 on virtualenv …
kwatog
  • 33
  • 6
1
vote
1 answer

Why apache throws Target WSGI script not found or unable to stat on Flask app?

I want to setup my flask app for apache on my ubuntu server using wsgi. But after my setup, I get the following browser error: Not Found The requested URL / was not found on this server. The apache error log throws: Target WSGI script not found or…
user2212461
  • 3,105
  • 8
  • 49
  • 87
1
vote
1 answer

apache wsgi django path issue frustration

I have read similar questions/answers but I cant resolve the situation. So I have installed WSGI and want to serve my django app from Apache. What I did initially was to create with virtualenv the folder testing which holds the python related…
user3124171
  • 401
  • 2
  • 7
  • 19
1
vote
3 answers

Django1.7 'RemovedInDjango19Warning' when using apache with mod_wsgi

i am using Django version 1.7 for an application, everything was running good in my developpement PC (i was runnin it using manage.py runserver command. now i am trying to move it to a production server. in the production server, everything is still…
Soufiaane
  • 1,737
  • 6
  • 24
  • 45
1
vote
1 answer

How to use Python3 with apache, using MySQL as a database language?

I've been bugging on this task for a while now, and I've found a lot posts addressing this problem but none seemed recent enough to help me (A lot of posts about python 2.7, and the few ones about python3 weren't using MySQL) I am using Django 1.9,…
Blopblop
  • 11
  • 3
1
vote
1 answer

site.addsitedir not fully processing .pth file

This is a apache/mod_wsgi/virtualenv/django stack. In the virtualenv site-packages dir I've got a virtualenv_path_extensions.pth file. The apache conf has a WSGIScriptAlias / /path/to/my.wsgi my.wsgi…
EMiller
  • 1,138
  • 8
  • 23
1
vote
0 answers

How do I allow outgoing connections only for a particular user in UFW?

I have a hosting server where I have apache webserver installed along with mod_wsgi. My server runs on python flask. Some of the libraries I am using use urllib2 and when I deny all the outgoing connections, urrlib2 also stops working. Can someone…
Aditya
  • 1,240
  • 2
  • 14
  • 38
1
vote
1 answer

mod_wsgi won't allow a child process to exit

I've built a website using CherryPy, Apache, and mod_wsgi, and everything's great except for one problem. When a user action calls for an email to be automatically sent, I sometimes use os.fork so that the parent process can return immediately and…
sk1
  • 13
  • 4
1
vote
1 answer

WSGIDaemonProcess does not affect python site

On a single CentOS server I want to manage multiple Django applications, one per domain, using virtual hosts and virtualenvs (each application has its own virtual environment). I will present here my configuration, the logs produced and explain what…
AkiRoss
  • 11,745
  • 6
  • 59
  • 86
1
vote
2 answers

Put Django site in sub directory of another django site

The site runs fine at local host but when I go to localhost/site2 it just loads the 404 page for the root Django site. ServerName localhost #site1.com #ServerAlias www.site1.com ErrorLog…
User
  • 23,729
  • 38
  • 124
  • 207
1
vote
1 answer

Why would a "user is taken" method that queries a MySQL database pass an immutable dict?

I am creating a Flask Application that connects to a locally-hosted MySQL database (Using SQL-Alchemy ORM). When a user creates an account, I have a method is_taken and returns True or False depending on if a user with that username already…
rawells14
  • 59
  • 5
1
vote
1 answer

Path issue Pip (Psycopg2) inside VirtualEnv

When using Pip (6.0.8) to install Django (1.9) and Psycopg2 (2.6.1), Django got installed in the env/lib/python2.7/site-packages folder and Psycopg2 in the env/lib64/python2.7/site-packages folder. When I'm using command line (eg python manage.py…
maarten84
  • 11
  • 1
1
vote
1 answer

Fixing/Adding symlink

I'm trying to compile mod_wsgi for use with python2.7 on my centos 6.6 server. I've downloaded the source code and ran the following command - ./configure --with-python=/usr/local/bin/python2.7 --disable-framework Which ran fine. However, when I…
whoisearth
  • 4,080
  • 13
  • 62
  • 130
1
vote
1 answer

Is there a typical mod_wsgi project directory?

I've followed the excellent tutorial https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-centos-7 to install Apache, mod_wsgi, and Django. All such tutorials leave the location of the…
Dave
  • 3,834
  • 2
  • 29
  • 44
1
vote
1 answer

How To Use PostgreSQL with a Django Application on CentOS 7 with Python 3.4 and Apache2

I'm running a CentOS 7 server and I managed to get a Django site up and running by doing the following: Ran yum install httpd gcc mod_wsgi Installed PostgreSQL 9.4 Downloaded and compiled Python 3.4 Used pyvenv3.4 to create a virtual…
user3624702
  • 123
  • 8