mod-wsgi

Django Deployment: Cutting Apache's Overhead

…衆ロ難τιáo~ 提交于 2019-12-18 10:30:41
问题 I have a small VPS server that has a Nginx front end that serves up static media files and passes Django requests back to an Apache 2.2 prefork MPM server running mod_wsgi. With one (very) small site loaded and working, it's currently using 143MB of 256MB of RAM. Using the top command I can see that Apache is using 52.9% of available RAM, with memcache in second using 2.1%. Considering that I'm planning on putting quite a few Django projects on this one server, I'm wondering if there is

Python & XAMPP on Windows: how to?

99封情书 提交于 2019-12-18 10:25:08
问题 I have installed on my Win7x64 Xampp and Python 2.7. Now I'm trying to get the "power" of Python language... how can I do it? I've tried with mod_python and mod_wsgi but the first one does not exist for my version of Python, and when I try to start Apache after installing wsgi it gives me an error < Directory "\x93C:/wsgi_app\x94"> path is invalid I added a space between < and 'directory' to make the string visible here. So... Anyone knows if there is a little tutorial to install these

Django with mod_wsgi returns 403 error

六眼飞鱼酱① 提交于 2019-12-18 08:54:39
问题 I am trying to use Django with Apache (and mod_wsgi). With the default Django webserver everything was going well, but now I get 403 (access forbidden) error when trying to load the page. I searched previous posts here and read official docs but the solutions there weren't helpful. Here are the lines from my httpd.conf: WSGIScriptAlias / /home/karlis/django/apache/django.wsgi <Directory /home/karlis/django/apache> Order allow,deny Allow from all </Directory> Alias /media/ /home/karlis/django

Django / Apache / mod_wsgi: No module named importlib

断了今生、忘了曾经 提交于 2019-12-18 05:53:45
问题 After working with django's dev server for the past two months, the time finally came to move to apache + mod_wsgi. The problem is when I go to my site (let's call it junux), to the URL mapped to the django app, things do not seem to work. When running the dev server on the server things work properly. The bottom-line of the error is given to me in the apache error_log: ImportError: Could not import settings 'junux_site.settings' (Is it on sys.path?): No module named importlib I'm aware this

Django / Apache / mod_wsgi: No module named importlib

有些话、适合烂在心里 提交于 2019-12-18 05:52:37
问题 After working with django's dev server for the past two months, the time finally came to move to apache + mod_wsgi. The problem is when I go to my site (let's call it junux), to the URL mapped to the django app, things do not seem to work. When running the dev server on the server things work properly. The bottom-line of the error is given to me in the apache error_log: ImportError: Could not import settings 'junux_site.settings' (Is it on sys.path?): No module named importlib I'm aware this

Where do I put “WSGIPassAuthorization On”?

懵懂的女人 提交于 2019-12-18 03:57:41
问题 I'm trying to see the Authorization header in Django, using mod_wsgi. I read that Apache holds back the Authorization header by default, I've put << WSGIPassAuthorization On >> in my Apache VirtualHost block and . . . nada. How do I figure out where to put this? 回答1: Put it at same place as WSGIScriptAlias and it should work fine. 回答2: Connect to your EC2, go to etc/httpd/conf.d folder and open wsgi.conf file. Insert the code within VirtualHost DOM: WSGIPassAuthorization On RewriteEngine on

running Apache + Bottle + Python

吃可爱长大的小学妹 提交于 2019-12-18 03:38:14
问题 I'm trying to run Bottle.py with Apache and mod_wsgi. I'm running it on windows, using a xampp. python v2.7 My Apache config in httpd: <VirtualHost *> ServerName example.com WSGIScriptAlias / C:\xampp\htdocs\GetXPathsProject\app.wsgi <Directory C:\xampp\htdocs\GetXPathsProject> Order deny,allow Allow from all </Directory> </VirtualHost> My app.wsgi code: import os os.chdir(os.path.dirname(__file__)) import bottle application = bottle.default_app() My hello.py: from bottle import route @route(

AWS Elastic Beanstalk - Script timed out before returning headers: application.py

折月煮酒 提交于 2019-12-17 22:34:05
问题 I have an existing Elastic Beanstalk flask app on AWS that occasionally will not initialize and gives the following error: [Mon Jan 23 10:06:51.550205 2017] [core:error] [pid 7331] [client 127.0.0.1:43790] script timed out before returning headers: application.py [Mon Jan 23 10:10:43.910014 2017] [core:error] [pid 7329] [client 127.0.0.1:43782] End of script output before headers: application.py Any ideas why this might be? Most recently I changed the project's requirements.txt to include

Multiple mod_wsgi apps on one virtual host directing to wrong app

给你一囗甜甜゛ 提交于 2019-12-17 21:46:24
问题 I'm trying to get two (or more) Django applications set up at subdirectories under the same domain, e.g.: http://example.com/site1/ http://example.com/site2/ I know that normally this works fine by setting up an apache virtualhost like this: <VirtualHost *:80> ... WSGIScriptAlias /site1 /path/to/site1.wsgi WSGIScriptAlias /site2 /path/to/site2.wsgi </VirtualHost> Now, I've verified that each site works individually. But when I try to run both side-by-side, apache sends me to whichever site

Django Apache Redirect Problem

ⅰ亾dé卋堺 提交于 2019-12-17 19:34:46
问题 I'm configuring my Django project to run on Apache using mod_wsgi. I am attempting to run Django below the directory 'cflow' on apache, but am running into problem with redirects. My apache conf looks something like this: ... WSGIScriptAlias /cflow "C:\Program Files\Apache Software Foundation\Apache2.2\wsgi\django.wsgi" <Directory "C:\Program Files\Apache Software Foundation\Apache2.2\wsgi"> Order allow,deny Allow from all </Directory> <Directory "C:\Projects\myproject\src"> Order allow,deny