mod-wsgi

Set up the Django settings file via DJANGO_SETTINGS_MODULE environment variable with Apache WSGI

对着背影说爱祢 提交于 2019-12-06 04:41:55
问题 How to change the settings file used by Django when launched by Apache WSGI only with DJANGO_SETTINGS_MODULE environment variable ? The Django documentation shows how-to achieve this with a different WSGI application file but if we don't want to create a dedicated WSGI file as well as a dedicated settings file for our different environments, using only environment variable DJANGO_SETTINGS_MODULE in Apache with SetEnv is not sufficent. The variable is indeed passed to application call in

Downtime when reloading mod_wsgi daemon?

…衆ロ難τιáo~ 提交于 2019-12-06 03:57:25
问题 I'm running a Django application on Apache with mod_wsgi. Will there be any downtime during an upgrade? Mod_wsgi is running in daemon mode, so I can reload my code by touching the .wsgi script file, as described in the "ReloadingSourceCode" document: http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode. Presumably, that reload requires some non-zero amount of time. What happens if a request comes in during the reload? Will Apache queue the request and then complete it once the wsgi

ProxyPass and ProxyPassReverse for Django app

99封情书 提交于 2019-12-06 03:20:12
I have a follow up question from my original Django serving question which was how to develop Django apps and serve them from the same server as my main PHP-based site (all part of a larger migration of my website from a static and PHP driven one to a series of Django apps). I couldn't quite use the name server solution I was provided with, and instead just deployed my Django applications on a different port (8000) using mod_wsgi. Now, however, I need to actually integrate the Django application into the main site. In my Apache 2.0 configuration file (for say http://www.example.com ) I added

Configuration problems with django and mod_wsgi

佐手、 提交于 2019-12-06 03:02:26
问题 I've got problems on getting django to work on apache 2.2 with mod_wsgi. Django is installed and mod_wsgi too. I can even see a 404 page when accessing the path and I can login to django admin. But if I want to install the tagging module I get the following error: Traceback (most recent call last): File "setup.py", line 49, in <module> version_tuple = __import__('tagging').VERSION File "/home/jim/django-tagging/tagging/__init__.py", line 3, in <module> from tagging.managers import

Serving Django apps using mod_wsgi from a site that does not run Django from /

試著忘記壹切 提交于 2019-12-06 02:54:08
I have a website that I am currently rewriting app-by-app using Django. Server is RedHat. Running Apache 2. Installed mod_wsgi. Everything works fine. Awesome. If I go to http://www.example.com/ I get to the main site that pre-exists (in PHP). I have mod_wsgi running and working just fine. If I go to http://www.example.com/django/ I get to my Django powered homepage. I have several apps that work from that just fine: http://www.example.com/django/software : runs my Django software app just fine. http://www.example.com/django/newsletter : runs my Django newsletter app just fine. All the reverse

Logging in python + mod_wsgi app

[亡魂溺海] 提交于 2019-12-06 02:20:11
I've deployed a python flask app on an apache server. Here is my abc.conf file: WSGIDaemonProcess voting_app threads=5 WSGIScriptAlias /election /var/www/voting_app/voting.wsgi LogLevel info ErrorLog "/var/www/voting_app/error.log" CustomLog "/var/www/voting_app/access.log" combined <Directory /var/www/voting_app> WSGIProcessGroup voting_app WSGIApplicationGroup %{GLOBAL} Order deny,allow Allow from all </Directory> To check debugging I made a syntax error in my application. On restarting the server, I am getting a 500 server error but I cant see the details of the error anywhere. I checked

Django/Apache/mod_wsgi not using virtualenv's Python binary

心已入冬 提交于 2019-12-06 02:05:35
问题 I have a virtualenv at /opt/webapps/ff/ with its own Python installation. I have WSGIPythonHome set to /opt/webapps/ff in my Apache config file (and this is definitely getting used in some capacity, because if I set it to a slightly different existing directory and restart Apache I get a 504). But if I e.g. assert False in a view somewhere to bring up the Django debug page, I see that settings.PYTHON_BIN is /usr/bin rather than /opt/webapps/ff/bin . How do I get Apache/mod_wsgi to use my

File writing permission denied in mod_wsgi deployed app

吃可爱长大的小学妹 提交于 2019-12-06 00:59:01
问题 I'm trying to deploy a Pyramid app using mod_wsgi on Apache. I get IOError: [Errno 13] Permission denied on templates folder, where mako caches his templates, even if I grant write permissions to anybody . If I remove template caching from my ini file the site runs flawlessly. I also tried running Apache as the user owning the folder instead of www-data with no luck. Any clue? 回答1: It's an Apache permission issue, I had to change owner of folder to www-data user and set permissions to 775

Problems compiling mod_wsgi in virtualenv

最后都变了- 提交于 2019-12-06 00:54:40
问题 I'm trying to compile mod_wsgi (version 3.3), Python 2.6, on a CentOS server - but under virtualenv , with no success. I'm getting the error: /usr/bin/ld: /home/python26/lib/libpython2.6.a(node.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /home/python26/lib/libpython2.6.a: could not read symbols: Bad value According to the mod_wsgi Installation Issues docs, it could be that the libpython2.6.a file: isn't there wasn't

Building mod_wsgi using python 2.5 on Snow Leopard

自作多情 提交于 2019-12-06 00:12:55
I'm using the Python 2.5 that came with Mac OS X Snow Leopard (10.6). I've set the defaults value: defaults write com.apple.versioner.python Version 2.5 and normally I get python 2.5 as it suggests. However when I try to build mod_wsgi, that doesn't seem to adhere. I've used the --with-python=/usr/bin/python2.5 option to configure to force it to use python 2.5 but the shared library which is built ends up with references to the python 2.6 libraries. I've also tried: setting $VERSIONER_PYTHON_VERSION to 2.5 before building leaving off --with-python I read through the discussion on a similar SO