mod-wsgi

Running django project on apache in ubuntu

倖福魔咒の 提交于 2019-12-12 06:41:17
问题 I want to run my django project on apache server. I found ton of tutorial to run django project on apache but in virtualenv. But I dont want to use virtualenv. I have installed apache2 and got it running fine. I installed mod_wsgi. Now what I need to do? I am doing this whole thing in ubuntu/local environment. Can any one help me??? 回答1: you have to configure apache's virtual host configure file in /etc/apache/site-available (in case of Ubuntu) and give the path of your wsgi web application

Why can't apache see my python module?

霸气de小男生 提交于 2019-12-12 05:39:46
问题 I am running a Python 3.4 virtualenv on Ubuntu 14.04 with mod_wsgi in apache 2.4. For some reason, apache cannot see the pyodbc.cpython-34m.so module (which, of course, lacks a .py extension). The module is within my virtualenv site-packages directory with a cpython-34m.so extension: (python3env)user@vlinuxweb:/home/production_code/python3env/lib/python3.4/site-packages$ ls django pyasn1-0.1.8-py3.4.egg-info Django-1.7.8.dist-info __pycache__ django_mssql-1.7.dist-info pymssql-2.1.1-py3.4.egg

Target WSGI script '../wsgi.py' cannot be loaded as Python module

為{幸葍}努か 提交于 2019-12-12 04:27:08
问题 I'm deploying a django project and getting that 500 error (see Server log error). Where am I doing wrong? some notes: centOS mod_wsgi installed same python (2.7) and django (1.9.6) version in both develop and deploy environement using virtualenv in deploy environement Server log error [Wed Sep 21 17:07:54 2016] [error] [client 192.168.30.93] SyntaxError: invalid syntax [Wed Sep 21 17:07:54 2016] [error] [client 192.168.30.93] mod_wsgi (pid=6570): Target WSGI script '/new_esmart/esmart2

CKAN distribution not found error while trying to serve CKAN from apache

青春壹個敷衍的年華 提交于 2019-12-12 04:18:01
问题 I am trying to configure datapusher for ckan 2.7 and as a prerequisite i have installed datastore and apache http server. apache httpd version: Apache/2.4.25 (Unix) mod_wsgi package installed 4.5.15 the permissions for the conf files are as specified in the ckan documentation http://docs.ckan.org/en/latest/maintaining/installing/deployment.html contents of ckan_default.conf are WSGIScriptAlias / /etc/ckan/default/apache.wsgi WSGIPassAuthorization On WSGIDaemonProcess ckan_default display-name

Running Flask-SocketIO on WebFaction through mod_wsgi

元气小坏坏 提交于 2019-12-12 03:36:19
问题 I have deployed a Flask application on Webfaction using mod_wsgi. My application is pretty simple but does implement Flask-SocketIO which is giving me troubles. My code works fine on my localhost but now that it is running on my Webfaction server the client is unable to connect to my socket. I'm not quite sure where my problems are coming from – I'm assuming I haven't set up my apache config file properly but this may not be true. On the client side I receive a 400 (Bad Request) error on both

Deploy Python Falcon app with Apache2

荒凉一梦 提交于 2019-12-12 03:33:24
问题 I have developed an api using falcon framework (v1.0). Now, I want to deploy this api on apache2 server with mod_wsgi at amazon EC2 instance. I'm running my app using wsgiref package on EC2 server. import falcon from wsgiref import simple_server api = app = falcon.API() class Resource(object): def on_get(self, req, resp): print("i was here :(") if 'fields' in req.params: print(req.params['fields']) print(len(req.params['fields'])) print(type(req.params['fields'])) res = Resource() api.add

Django Production Deployment : Should we not remove source files ?

好久不见. 提交于 2019-12-12 03:31:58
问题 Hi I am a newbie to Django AND Python. Working currently on a dummy project using Django 1.9. So following the excellent Django Documentation I could complete the deployment using apache/mod_wsgi and it is running on a test web server on my local machine. But I am wondering about the Python source files : I have given the path to my development directory - say /Python-labs/mysite/ to mod_wsgi and apache configuration ( httpd.conf ) files. This development directory obviously contains all the

Using Python Flask-restful with mod-wsgi

南楼画角 提交于 2019-12-12 03:29:32
问题 I am trying to use mod-wsgi with Apache 2.2 I have the following directory structure: scheduling-algos -lib -common -config -config.json resources -Optimization.py optimization.wsgi optimization_app.py My optimization_app.py is the following: from flask import Flask from flask_restful import Api from resources.Optimization import OptimizationAlgo def optimizeInstances(): optimization_app = Flask(__name__) api = Api(optimization_app) api.add_resource(OptimizationAlgo, '/instances') if __name__

mod_wsgi (pid=2179): Target WSGI script '/opt/graphite/conf/graphite.wsgi' cannot be loaded as Python module

若如初见. 提交于 2019-12-12 03:24:40
问题 I am working on AWS RHEL server. Getting this error each time I access the webpage(Webpage showing 500). Error.log: [Sat Jul 09 02:51:12.736533 2016] [:error] [pid 2179] mod_wsgi (pid=2179): Target WSGI script '/opt/graphite/conf/graphite.wsgi' cannot be loaded as Python module. [Sat Jul 09 02:51:12.736572 2016] [:error] [pid 2179] mod_wsgi (pid=2179): Exception occurred processing WSGI script '/opt/graphite/conf/graphite.wsgi. [Sat Jul 09 02:51:12.736593 2016] [:error] [pid 2179] Traceback

Unexpected behavior from Popen once web app is deployed with apache

◇◆丶佛笑我妖孽 提交于 2019-12-12 03:03:36
问题 I have some code that uses subprocess to look at the logs from a git directory. My code seems to work fine when executed in a local django dev environment. Once deployed however (with Apache / mode_wsgi) the output from stdout read() comes back empty. My development and production machine are the same right now, and I also tried making sure every file was readable. Does anybody have an idea why Popen is not returning any output once deployed here? Thanks. def getGitLogs(projectName,