mod-wsgi

pywintypes27.dll not found using Apache, Django, pywin32, Python2.7 and mod_wsgi

半世苍凉 提交于 2019-12-05 14:21:56
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 error related to it trying to find a .dll which does exist: Exception Type: ImportError Exception Value: No system module 'pywintypes' (pywintypes27.dll) Exception Location: C:\Python27\lib\site-packages\win32\lib\pywintypes.py in __import_pywin32_system_module__, line 98 Python Executable: C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\httpd.exe I used ActivePython2.7.2, mod_wsgi, pywin32 Build 216 and Django1.3.1,

apache mod_wsgi error with django in virtualenv

瘦欲@ 提交于 2019-12-05 14:00:13
I can't seem to find a good answer to this. Who needs to own the virtualenv when running it as a WSGIDaemon? I assume on my OS (Ubuntu 16) www-data, but I want to be sure. Trying some new things to get this thing working based off of the answer from this post... django apache configuration with WSGIDaemonProcess not working Does the django project, the virtualenv folder, or both need to be owned by the apache group? What ownerships need to be in place to serve a django project without specifying a port? Why do I get the following? The root problem: Call to 'site.addsitedir()' failed for '(null

Change mod_wsgi from python3.5 to 3.6

微笑、不失礼 提交于 2019-12-05 13:02:39
I have a flask app that used to run with python3.5 on apache2. I am now trying to change it to run on 3.6 (i have sone type hinting in my code that is only supported on 3.6). I have installed the module for python3.6, but when tried to restart apache and run my app, it fails. When running mod_wsgi-express module-location I have the python3.5 version /usr/local/lib/python3.5/dist-packages/mod_wsgi/server/mod_wsgi-py35.cpython-35m-x86_64-linux-gnu.so The same file also existis on my server in python3.6 dir. I also changed my $PATH to run python3.6 as a default for python. How can I tell apache

deploying a WSGI application on mod_python

杀马特。学长 韩版系。学妹 提交于 2019-12-05 11:12:46
I wrote a WSGI application which I need to deploy to a server, however I've been given a server that already has mod_python installed. I am not allowed to remove mod_python since there are some mod_python applications running on it already. One option I considered was installing mod_wsgi alongside mod_python, however I went through sources and found that was a bad idea. Apparently mod_wsgi and mod_python don't mix well. Another option I considered was installing mod_fastcgi and deploying it using fastcgi. I would love to hear if someone has a better idea which doesn't break the current mod

“DLL load failed” when using mercurial on trac

眉间皱痕 提交于 2019-12-05 09:35:22
My mercurial repository works correctly in trac when I use the tracd server. However, when I use apache , I get the following warning at the top of all trac pages: Warning: Can't synchronize with repository "(default)" (Unsupported version control system "hg": DLL load failed: The specified module could not be found.). Look in the Trac log for more information. The trac log doesn't have anything useful except a warning about mercurial being compiled with Python 2.6.2 and the actual version of Python running being 2.6.4. Does anyone have any ideas on how to solve this? Versions: Python 2.6

Apache2 command such as a2enmod and a2ensite no working its showing command not found in Ubuntu

ぃ、小莉子 提交于 2019-12-05 08:48:28
I am deploying Flask application in Apache2 server during this i need to run a command for enabling mod_wsgi by using: sudo a2enmod wsgi but its showing: sudo: a2enmod: command not found please help thanks I had the same problem with using Ubuntu 16.04 in AWS. However, installing apache2 along with libapache2-mod-wsgi and python-dev solved the issue. Try: sudo apt-get update sudo apt-get install apache2 libapache2-mod-wsgi python-dev Then, sudo a2enmod wsgi 来源: https://stackoverflow.com/questions/49138215/apache2-command-such-as-a2enmod-and-a2ensite-no-working-its-showing-command-not

Django + Apache + Windows WSGIDaemonProcess Alternative

冷暖自知 提交于 2019-12-05 07:24:51
After setting up a django site and running on the dev server, I have finally gotten around to figuring out deploying it in a production environment using the recommended mod_wsgi/apache22. I am currently limited to deploying this on a Windows XP machine. My problem is that several django views I have written use the python subprocess module to run programs on the filesystem. I keep getting errors when running the subprocess.Popen I have seen several SO questions that have asked about this, and the accepted answer is to use WSGIDaemonProcess to handle the problem (due to permissions of the

Django mod_wsgi apache

左心房为你撑大大i 提交于 2019-12-05 06:20:58
When I try to visit my Django site at http://www.satoshi.example.com/mysite I get a 503 Service Temporary Unavailable . The Apache error log says [Tue Feb 28 07:11:09 2012] [error] [client 10.0.0.202] (13)Permission denied: mod_wsgi (pid=4756): Unable to connect to WSGI daemon process 'django' on '/etc/httpd/logs/wsgi.17555.4.1.sock' after multiple attempts. Apache properly loads mod_wsgi root@satoshi:~/html/mysite# apachectl -M | grep wsgi wsgi_module (shared) Syntax OK Apache loads /var/www/html/mysite/apache/apache_django_wsgi.conf which is WSGIDaemonProcess django WSGIProcessGroup django

Python modules autoloader?

无人久伴 提交于 2019-12-05 06:10:18
How can I autoload all my modules that kept in different directories and sub directories? I have seen this answer which is using __import__ , but it is still not the autoload that I have in mind. I'm thinking something similar to PHP autoloader . Even better something like Composer autoloader . It seems that autoloader is not a popular thing in Python from the research I have gathered so far (can't be sure as I'm new in Python). Is autoloading something not encourage-able in Python? My autoload code so far, import os import sys root = os.path.dirname(__file__) sys.path.append(root + "/modules"

OperationalError: attempt to write a readonly database in ubuntu server

混江龙づ霸主 提交于 2019-12-05 05:02:40
I'm running a FlaskApp using mod_wsgi and apache2 on Ubuntu server. I tried running the flask app on localhost successfully and then deployed it on ubuntu server. But when i try to update database, its giving error: Failed to update model. (OperationalError) attempt to write a readonly database u'UPDATE mysongs SET songurl=? WHERE songid.id = ?' (u'www.site.com/I_wanna_dance', 1) Now i tried look for database file permission which is: -rwxr-xr-x 1 www-data www-data 10240 Jul 14 15:35 /var/www/mywebsite/appfolder/appdata.db When i try changing permission to 777, 755, 644 etc. it shows another