mod-wsgi

webapp2 under Apache (= without Google App Engine)

眉间皱痕 提交于 2019-12-21 05:12:11
问题 I am trying to run webapp2 under Python with Apache and mod_wsgi - specifically: Wampserver for Windows 7 with Apache 2.2.22. So far, I have failed miserably. :-( I used the following example from https://developers.google.com/appengine/docs/python/gettingstartedpython27/usingwebapp: import webapp2 class MainPage(webapp2.RequestHandler): def get(self): self.response.headers['Content-Type'] = 'text/plain' self.response.out.write('Hello, webapp World!') app = webapp2.WSGIApplication([('/',

SSL based virtual host with django and mod_wsgi

别等时光非礼了梦想. 提交于 2019-12-21 05:02:08
问题 I have a django web application in which some URLs are allowed to be accessed over http while others have to be over http-secure only. I need to set up the virtualHost/ mod_wsgi configuration in my apache conf file, so that the same web application can be accessed over both. I followed these 2 posts How to force the use of SSL for some URL of my Django Application? Django and SSL question and have the following configuration which I think should do the trick. NameVirtualHost *:80 <VirtualHost

Django, apache, mod_wsgi - Error: Premature end of script headers

旧时模样 提交于 2019-12-21 03:44:18
问题 Apache logs in mode debug: [Tue Dec 21 11:36:33 2010] [info] [client 1.53.149.114] mod_wsgi (pid=24831, process='mysite', application='mysite.com|'): Loading WSGI script '/home/anhtran/webapps/mysite.com/django.wsgi'. [Tue Dec 21 11:36:33 2010] [error] [client 1.53.149.114] Premature end of script headers: django.wsgi [Tue Dec 21 11:36:33 2010] [notice] child pid 24831 exit signal Segmentation fault (11) [Tue Dec 21 11:36:33 2010] [info] mod_wsgi (pid=24980): Attach interpreter ''. My conf

Hello World - Flask / Apache / mod_wsgi - no response from Apache

血红的双手。 提交于 2019-12-21 01:45:11
问题 I am following the tutorial at http://www.enigmeta.com/2012/08/16/starting-flask/ to develop and deploy a simple flask app to Apache using mod_wsgi. I think I've narrowed it to a flaw in my Apache config. If I run helloflask.py from the command line, it works fine. I can access it via wget from another shell at localhost:5000, and I get the correct response. I also have other virtual hosts (non wsgi) up and running, so I know Apache is running and responding to other requests on port 80. I

Python 3.1.1 with --enable-shared : will not build any extensions

∥☆過路亽.° 提交于 2019-12-20 23:31:07
问题 Summary: Building Python 3.1 on RHEL 5.3 64 bit with --enable-shared fails to compile all extensions. Building "normal" works fine without any problems. Please note that this question may seem to blur the line between programming and system administration. However, I believe that because it has to deal directly with getting language support in place, and it very much has to do with supporting the process of programming, that I would cross-post it here. Also at: https://serverfault.com

How do I use a conda environment with mod_wsgi?

醉酒当歌 提交于 2019-12-20 17:46:20
问题 My first post, and I'm new to both Python and Apache, so please go easy on me. I have a Python web application in a conda environment that serves up content just fine using Flask. Now I need to serve everything with Apache instead of Flask. I can get Apache to run Python with mod_wsgi, but only with virtualenv. I tried installing virtualenv with Anaconda, but I received a warning that such a setup is unsupported and not recommended. So my question is this: How do I set up Apache to run my

How do I use a conda environment with mod_wsgi?

给你一囗甜甜゛ 提交于 2019-12-20 17:46:07
问题 My first post, and I'm new to both Python and Apache, so please go easy on me. I have a Python web application in a conda environment that serves up content just fine using Flask. Now I need to serve everything with Apache instead of Flask. I can get Apache to run Python with mod_wsgi, but only with virtualenv. I tried installing virtualenv with Anaconda, but I received a warning that such a setup is unsupported and not recommended. So my question is this: How do I set up Apache to run my

ImportError: No module named django.core.handlers.wsgi in install django mod_wsgi config on apache

社会主义新天地 提交于 2019-12-20 16:16:07
问题 I tried to install django to work with apache and mod_wsgi but get this error: ImportError: No module named django.core.handlers.wsgi, I'v read that it may be user error... On the console (ssh), with root access, I don't have any problems accessing django.core.handlers.wsgi , but when apache asks to access it, it can't My django.wsgi: import os import sys sys.path.append('my/rep/parents/of/my/project') sys.path.append('/usr/lib/python2.4/site-packages/django') os.environ['DJANGO_SETTINGS

Where should WSGIPythonPath point in my virtualenv?

对着背影说爱祢 提交于 2019-12-20 11:41:20
问题 I have a folder called python2.7 inside of lib in the virtual environment. After reading half a dozen tutorials, I can't figure out exactly what I'm suppose to point the WSGIPythonPath to. I've seen some pointing to site-packages but some have been a colon : separated list. Syntax error on line 1019 of /etc/httpd/conf/httpd.conf: WSGIPythonPath cannot occur within <VirtualHost> section Where should WSGIPythonPath point in my virtualenv? 回答1: You are getting the error because WSGIPythonPath

django - protect some web paths with basic authentication

瘦欲@ 提交于 2019-12-20 10:43:30
问题 i'm fairly new to django and just trying a couple simple experiments to get my feet wet. i'm running django 1.0, apache2 prefork and mod_wsgi. I'm trying to build a site with the following url structure / /members /admin the root is basically a public area. the members path should be protected using basic-authentication (probably authenticated by apache) the admin path should be protected using the built in django authentication. following the examples in documentation i can basically protect