mod-wsgi

How to install & configure mod_wsgi for py3

妖精的绣舞 提交于 2019-12-17 18:07:31
问题 I installed & configured mod_wsgi for python2.7 but now I would also like to have mod_wsgi for py3 I'm in ubuntu 12.04 My apache conf file looks like this for py2.7 : <Directory /var/www/vhosts/my_web> WSGIProcessGroup my_web WSGIApplicationGroup %{GLOBAL} Order deny,allow Allow from all </Directory> Now I would like to install mod_wsgi for python3. I think I have to do apt-get install libapache2-mod-wsgi-py3 But I can't find any instruction on how to configure mod_wsgi for py3. a) Can I keep

In production, Apache + mod_wsgi or Nginx + mod_wsgi?

社会主义新天地 提交于 2019-12-17 17:24:55
问题 What to use for a medium to large python WSGI application, Apache + mod_wsgi or Nginx + mod_wsgi? Which combination will need more memory and CPU time? Which one is faster? Which is known for being more stable than the other? I am also thinking to use CherryPy's WSGI server but I hear it's not very suitable for a very high-load application, what do you know about this? Note : I didn't use any Python Web Framework, I just wrote the whole thing from scratch. Note' : Other suggestions are also

mod_wsgi isn't honoring WSGIPythonHome

≯℡__Kan透↙ 提交于 2019-12-17 16:26:16
问题 I'm trying to get WSGI to run with a virtualenv setup. I have the virtualenv all working right: (virtualenv)dev:/var/www/app$ which python /var/www/virtualenv/bin/python (virtualenv)dev:/var/www/app$ python Python 2.6.1 (r261:67515, Dec 5 2008, 22:09:34) [GCC 4.1.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import importlib >>> And in my httpd.conf, I have the following, as described here: WSGIPythonHome /var/www/virtualenv WSGIPythonPath /var/www

mod_wsgi: ImportError: No module named 'encodings'

家住魔仙堡 提交于 2019-12-17 16:19:19
问题 I'm using Apache 2.2.15 on CentOS 6.5. I'm trying to set up a Django app using mod_wsgi. I'm using a virtual environment, and mod_wsgi was configured with --with-python=/path/to/virtualenv/bin/python3.4 . I've added this to my httpd.conf : WSGIPythonPath /srv/myproject:/path/to/virtualenv/lib/python3.4/site-packages WSGIPythonHome /path/to/virtualenv <VirtualHost *:80> WSGIScriptAlias / /srv/myproject/myproject/wsgi.py ... </VirtualHost> In wsgi.py , I added sys.path.insert(1, "/path/to

Run mod_wsgi with virtualenv or Python with version different that system default

喜欢而已 提交于 2019-12-17 11:46:10
问题 I am trying to make my Flask application work on CentOS server. Basically the issue is that I have Python 2.6 installed in /usr/bin which is system default and Python 3.4 installed in /usr/local/bin . I would like to use Python 3.4 virtualenv or at least Python 3.4 interpreter for mod_wsgi to run my application. I have created virtualenv in ~/virtualenvs/flask . I have this WSGI script: import os import sys from logging import Formatter, FileHandler APP_HOME = r"/home/fenikso/Album" activate

Django (wsgi) and Wordpress coexisting in Apache virtualhost

时光总嘲笑我的痴心妄想 提交于 2019-12-17 10:56:57
问题 I have a Django project that I need mounted at two different subdirectories of my url, and I need Wordpress running at /. So: *.example.com - WordPress *.example.com/studio - django *.example.com/accounts - django Here's the httpd.conf that I have so far: <VirtualHost *:80> ServerName wildcard.localhost ServerAlias *.localhost AddType application/x-httpd-php .php DocumentRoot /var/empty Alias /site_media/ /home/zach/projects/python/myproject/static/ Alias /media/ /home/zach/projects/python

Apache not serving django admin static files

爷,独闯天下 提交于 2019-12-17 10:21:12
问题 Let me thanks you guys at the Stack Overflow community for helping me with various Django and Apache (with mod_wsgi) errors. I've asked about 5 related questions so far and now I'm getting closer and closer to getting my content out on a production site! So I know there are many similar questions about this and I have read a bunch of questions about serving static media files on Django. I read about STATIC_URL , STATIC_ROOT , the (soon to be obsolete) ADMIN_MEDIA_PREFIX , and setting a Alias

Python : How to parse the Body from a raw email , given that raw email does not have a “Body” tag or anything

≯℡__Kan透↙ 提交于 2019-12-17 07:04:28
问题 It seems easy to get the From To Subject etc via import email b = email.message_from_string(a) bbb = b['from'] ccc = b['to'] assuming that "a" is the raw-email string which looks something like this. a = """From root@a1.local.tld Thu Jul 25 19:28:59 2013 Received: from a1.local.tld (localhost [127.0.0.1]) by a1.local.tld (8.14.4/8.14.4) with ESMTP id r6Q2SxeQ003866 for <ooo@a1.local.tld>; Thu, 25 Jul 2013 19:28:59 -0700 Received: (from root@localhost) by a1.local.tld (8.14.4/8.14.4/Submit) id

running a bottle app from mod_wsgi handle results in maximum recursion depth exceeded while calling a Python object

妖精的绣舞 提交于 2019-12-14 04:05:58
问题 I'm getting a strange "RuntimeError: maximum recursion depth exceeded while calling a Python object" from my bottle app. while running it from a wsgi handle (inside a virtualenv) in openshift paas service. the traceback doesn't offer me a clue about what's wrong I should also mention that running the bottle script straight on my dev maching (e.g python pythonapp.py) does work properly. edit: In order to verify this problem is connected to running bottle with mod_wsgi I installed it on my dev

Debian mod_wsgi : No module named 'psycopg2._psycopg'

亡梦爱人 提交于 2019-12-14 03:54:10
问题 I am struggling in making Django run with mod_wsgi. I tried to follow recommendations here but it did not work. The server is a Debian : $ lsb_release -da No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 8.3 (jessie) Release: 8.3 Codename: jessie Python 3.5.1 has been installed with --ensable-shared. The virtualenv venv uses this Python because of the following in the user .bash_profile : LD_LIBRARY_PATH=/usr/local/lib VIRTUALENVWRAPPER_PYTHON=/usr/local/bin