Meledictas

Latest Posts

All Posts

Embedded Linux Multiple VirtualHost setting for Apache mod_wsgi requires ordering of WSGIScriptAlias before ServerName Web API using Django and markup.py Generic, URL base view count for Django Getting to know your client using django middleware Django Hangman Settings up Mod_wsgi for Django on Webfaction Django 1.0 and mod_wsgi New Django Comment application Selenium RC, Python client

Apps

Visitors


Twitter


Last update - 2009 07 Jan 06:54 (every 600 seconds)

Latest photos



View Chatchai Naenudorn's profile on LinkedIn

Locations of visitors to this page

Readability counts.

Zen of Python by Tim Peters | More...  

Multiple VirtualHost setting for Apache mod_wsgi requires ordering of WSGIScriptAlias before ServerName



Posted on Mon 17 Nov 2008 at 13:22 . more...

A lot of mod_wsgi configuration tutorial configure the single VirtualHost as below (from mod_wigs wiki),

<VirtualHost *:80>

    ServerName www.example.com
    ServerAlias example.com
    ServerAdmin webmaster@example.com

    DocumentRoot /usr/local/www/documents

    <Directory /usr/local/www/documents>
    Order allow,deny
    Allow from all
    </Directory>

    WSGIScriptAlias /myapp /usr/local/www/wsgi-scripts/myapp.wsgi

    <Directory /usr/local/www/wsgi-scripts>
    Order allow,deny
    Allow from all
    </Directory>

</VirtualHost>

I spent around one hour try to configure multiple VirtualHost on webfaction. I did exactly but the request always be routed to the first VirtualHost setting.

The solution

I reordered the settings by putting the WSGIScriptAlias before ServerName and it works fine. The question is, is that required or I did something wrong?

Comments

#1 At 12:46 p.m. on December 9, 2008 lmlmvzbou says...

F8nhOi <a href="http://jloedbhvveil.com/">jloedbhvveil</a>, [url=http://rbvzcajtfuzx.com/]rbvzcajtfuzx[/url], [link=http://juidqmadsjoi.com/]juidqmadsjoi[/link], http://pdzcetbjkipv.com/

Post your comment...

:

:

: