mod-wsgi

Flask - WSGI - No module named 'flask'

心不动则不痛 提交于 2020-04-07 14:21:08
问题 I've been following Sentdex' Flask tutorial. He's using a Venv to set up his Flask, but didn't set his Python up to work with a Venv. I've tried installing Flask globally - yet it still doesn't work. Trying to browse to the server returns a 500 Internal Server Error I'm getting the usual no module named flask error. errorFGL.log [Sun Feb 05 11:22:32.043925 2017] [wsgi:error] [pid 26340:tid 118578538694400] [client 86.52.205.25:49814] mod_wsgi (pid=26340): Target WSGI script '/var/www-fgl

Strange Python compilation results with “--enable-shared” flag

随声附和 提交于 2020-03-14 07:41:10
问题 I am using Debian (which comes with Python-2.7.3), trying to compile Python-2.7.6 from source for use with mod_wsgi alongside Apache. Apparently you must use --enable-shared when compiling for mod_wsgi usage, according to numerous answers. Following these steps: ./configure --enable-shared --prefix=/usr/local/bin/python-2.7.6 make make install And then checking the interactive shell @ /usr/local/bin/python-2.7.6/bin/python I am greeted with "Python 2.7.3 (default, Jan 2 2013, 14:09:21)" etc

python sqlite3 OperationalError: attempt to write a readonly database

只愿长相守 提交于 2020-02-21 10:00:33
问题 I am trying to run a Flask REST service on CentOS Apache2 using WSGI. The REST service requires a very small storage. So i decided to use SQLite with sqlite3 python package. The whole application worked perfectly well on my local system and on the CentOS server when ran using app.run() . But when i used WSGI to host the application on Apache, i am getting OperationalError: attempt to write a readonly database I have checked the permissions of the file. The user and group of the file are set

python sqlite3 OperationalError: attempt to write a readonly database

北城余情 提交于 2020-02-21 09:59:35
问题 I am trying to run a Flask REST service on CentOS Apache2 using WSGI. The REST service requires a very small storage. So i decided to use SQLite with sqlite3 python package. The whole application worked perfectly well on my local system and on the CentOS server when ran using app.run() . But when i used WSGI to host the application on Apache, i am getting OperationalError: attempt to write a readonly database I have checked the permissions of the file. The user and group of the file are set

mod_wsgi process getting killed and django stops working

走远了吗. 提交于 2020-02-01 04:00:31
问题 I have mod_wsgi running in daemon mode on a custom Linux build. I haven't included any number for processes or threads in the apache config. Here is my config: WSGIDaemonProcess django user=admin WSGIProcessGroup django WSGIScriptAlias /django_apps /django/apache/django.wsgi WSGIApplicationGroup %{GLOBAL} On the system, there is a httpd cleanup process running which kills any httpd process that exceeds a certain memory threshold. It looks like the httpd process which is running mod_wsgi is

Server software choice for Django live/staging

狂风中的少年 提交于 2020-01-25 12:22:47
问题 For developing our Django web app, I'd like to move to an autonomous system that automatically updates the source (from VCS) of a staging copy of the app which has near identical properties to the live version of the application. The general idea of doing this has already been covered here on SO #625256. The Django documentation also talks about setting up virtual hosts to host 2 instances of Django on the same Apache. Many of the pieces I need to set this up are already in place. What my

Server software choice for Django live/staging

六眼飞鱼酱① 提交于 2020-01-25 12:22:47
问题 For developing our Django web app, I'd like to move to an autonomous system that automatically updates the source (from VCS) of a staging copy of the app which has near identical properties to the live version of the application. The general idea of doing this has already been covered here on SO #625256. The Django documentation also talks about setting up virtual hosts to host 2 instances of Django on the same Apache. Many of the pieces I need to set this up are already in place. What my

Server software choice for Django live/staging

不羁岁月 提交于 2020-01-25 12:22:24
问题 For developing our Django web app, I'd like to move to an autonomous system that automatically updates the source (from VCS) of a staging copy of the app which has near identical properties to the live version of the application. The general idea of doing this has already been covered here on SO #625256. The Django documentation also talks about setting up virtual hosts to host 2 instances of Django on the same Apache. Many of the pieces I need to set this up are already in place. What my

Make apache read all posted data before passing it on to Django

╄→гoц情女王★ 提交于 2020-01-25 04:55:32
问题 I have setup a Linux server with Apache and mod_wsgi. From my Apache configuration: WSGIDaemonProcess myapp processes=1 threads=10 Here myapp is a Django webapp. When myapp receives a large http POST request from Apache in a Django HttpRequest object, accessing the posted data the fist time takes several seconds of wallclock time. I assume this is because myapp is invoked before the full body of the POST is read from the network and that accessing the posted data in the HttpRequest object

Mod_wsgi worker processes segmentation fault (11)

一个人想着一个人 提交于 2020-01-24 16:06:16
问题 I am having a problem with my django application, which is hosted with apache/mod_wsgi. I added some matplotlib code into the application, and apache worker processes now crashing. I reduced this problem to the following: Without any matplotlib imports application works ok when "import matplotlib" is added anywhere in the application, worker processes die with segfault and users see no reply from server "import matplotlib" works just fine in commandline python interpreter - segfault happens