mod-wsgi

with Python is there a way to listen for changes when insert or update is made in mongodb

百般思念 提交于 2019-12-11 03:25:46
问题 I am building a small system which throws data from a mongodb collection, it already works fine but I have to restart it everytime I make changes. I already have a monitor that dectect changes and restarts the server automatically but I want to do something like this with mongodb changes. I am currenlty using CentOs 5, Nginx, uWsgi & python2.7. 回答1: I'd look into using tailable cursors, which remain alive after they've reached the end of a collection, and can block until a new object is

Django Apache wsgi virtualenv import error

与世无争的帅哥 提交于 2019-12-11 03:24:10
问题 I'm trying to deploy Django (located in a virtualenv) on Apache using WSGI deploying. I'm following the default tutorial from https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/ wsgi.py (the default one which Django generated, with the comments dropped): import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "server.settings") from django.core.wsgi import get_wsgi_application application = get_wsgi_application() apache2.conf (its the same httpd.conf just in Debian ).

RuntimeError: populate() isn't reentrant on CentOS 7 | django 1.9 | python3

你。 提交于 2019-12-11 03:18:00
问题 Im deploying a django application on a intranet environment. I've already set up a testing server and everything is fine (after breaking my head fixing errors). This time, im seting up the production server and after configuring everything, i got an error 500, here is the httpd/logs/error_log : traceback [Thu Oct 27 09:44:15.480662 2016] [:error] [pid 15250] [remote 10.105.40.106:200] mod_wsgi (pid=15250): Target WSGI script '/home/rortega/smce/smce/wsgi.py' cannot be loaded as Python module.

django-mssql not working in Apache w/ mod-wsgi, but works fine in dev server

佐手、 提交于 2019-12-11 03:08:39
问题 I have a Django application using django-mssql to communicate w/ SQL Server. This works just fine in the dev server (runserver) but under Apache/mod-wsgi, I get a fail related to it trying to find a .dll which does exist: [Thu May 19 15:35:09 2011] [error] [client 127.0.0.1] File "C:\\Python27\\lib\\site-packages\\win32\\lib\\pywintypes.py", line 98, in __import_pywin32_system_module__ [Thu May 19 15:35:09 2011] [error] [client 127.0.0.1] raise ImportError("No system module '%s' (%s)" %

Unable to connect to WSGI daemon process 'wsgi'

こ雲淡風輕ζ 提交于 2019-12-11 00:32:40
问题 As highlighted in multiple questions/asnwers before, namely this and this I have configured my WSGISocketPrefix to be /etc/httpd/run/wsgi /etc/httpd/run directory has permission root:apache and the sock file created has apache:root permission. The issue I am facing is that apache is always trying to connect to the sock which is one less than what it should be looking for . Example the sock is /var/run/httpd/wsgi.1769.1.1.sock but apache looks for /var/run/httpd/wsgi.1769.0.1.sock There are no

Python3 & WSGI Module error

不想你离开。 提交于 2019-12-11 00:31:37
问题 <VirtualHost *:80> ServerName superhost.gr ServerAdmin nikos@superhost.gr WSGIDaemonProcess public_html user=nikos group=nikos processes=1 threads=5 WSGIScriptAlias / /home/nikos/public_html/webapp.py ProxyPass / http://superhost.gr:5000/ ProxyPassReverse / http://superhost:5000/ <Directory /home/nikos/public_html> WSGIProcessGroup public_html WSGIApplicationGroup %{GLOBAL} WSGIScriptReloading On AddHandler wsgi-script .wsgi .py Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI

Apache mod_wsgi and php in the same domain

半世苍凉 提交于 2019-12-10 20:28:05
问题 is it possible to make my webserver run python and php in the same domain? I have a website in python/django that is www.mydomain.com. Now, i have to host a blog in www.mydomain.com/blog in wordpress. Can i make it through? Apache 2.2 mod_wsgi My config now: # RUNS PYTHON <VirtualHost *:80> DocumentRoot /home/padrao ErrorLog /home/padrao/logs/mydomain.com-error_log CustomLog /home/padrao/logs/mydomain.com-access_log common WSGIScriptAlias / /home/padrao/mywebsite.wsgi </VirtualHost> # RUNS

Flask can't see modules installed by pip

我只是一个虾纸丫 提交于 2019-12-10 18:23:35
问题 I installed Flask on Python 2.7.12/Apache 2.4/Ubuntu 16.04.1 LTS. I've been using these two tutorials to get set up. I'm not running venv or any other virtual environment (unlike this post). Running a simple Flask app works fine (a la "hello world"). I have a flaskapp.wsgi and a flaskapp.py in the same directory (/var/www/html). flaskapp.wsgi import sys sys.path.insert(0, "/var/www/html/flaskapp") from flaskapp import app as application flaskapp.py from flask import Flask app = Flask(__name__

Django WSGI Application SegFault

最后都变了- 提交于 2019-12-10 16:33:44
问题 so i'm getting segfaults with my django wsgi application in mod_wsgi via apache 2.22 here's the wsgi app: import os import sys sys.path.append('/home/***.com/zpencerq') sys.path.append('/home/***.com/zpencerq/part') os.environ['DJANGO_SETTINGS_MODULE'] = 'part.settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() here's the error from the logs: [Mon Jun 18 18:13:39 2012] [info] mod_wsgi (pid=78535): Create interpreter 'www.***.com|'. [Mon Jun 18 18

Howto configure Apache WSGI for multiple separate Django instances?

不羁岁月 提交于 2019-12-10 16:32:59
问题 I have an apache instance where I have the following WSGIPythonPath /production/somelocation/django12/lib/python2.4/site-packages/ <VirtualHost 192.168.1.1:443> WSGIScriptAlias / /opt/project.wsgi ..... My Django 1.5 app apache config looks like, WSGIPythonPath /production/somelocation/django15/lib/python2.7/site-packages/ <VirtualHost 192.168.1.2:443> .... WSGIScriptAlias / /opt/project2.wsgi My /opt/project.wsgi looks like import os import sys # django1.2 virtualenv import site site