Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 673017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:32:55+00:00 2026-05-14T00:32:55+00:00

I am trying to configure an apache server using mod_wsgi for dynamic mass hosting.

  • 0

I am trying to configure an apache server using mod_wsgi for dynamic mass hosting. Each user will have it’s own instance of a python application located in /mnt/data/www/domains/[user_name] and there will be a vhost.map telling me which domain maps to each user’s directory (the directory will have the same name as the user). What i do not know is how to write the WSGIScriptAliasMatch line so that it also takes the path from the vhost.map file.
What i want to do is something like this: I can have on my server different domains like http://www.virgilbalibanu.com or virgil.balibanu.com and flaviu.balibanu.com where each domain would belog to another user, the user name having no neccesary connection to the domain name. I want to do this beacuse a user, wehn he makes an acoount receives something like virgil.mydomain.com but if he has his own domain he can change it later to that, for example http://www.virgilbalibanu.ro, and this way I would only need to chenage the line in the vhost.map file
So far I have something like this:

Alias /media/ /mnt/data/www/iitcms/media/
#all media is taken from here

RewriteEngine on

RewriteMap lowercase int:tolower

# define the map file
RewriteMap vhost txt:/mnt/data/www/domains/vhost.map

#this does not work either, can;t say why atm
RewriteCond %{REQUEST_URI} ^/uploads/
RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$
RewriteCond ${vhost:%1} ^(/.*)$
RewriteRule ^/(.*)$ %1/media/uploads/$1

#---> this I have no ideea how i could do
WSGIScriptAliasMatch ^([^/]+) /mnt/data/www/domains/$1/apache/django.wsgi

<Directory "/mnt/data/www/domains">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<DirectoryMatch ^/mnt/data/www/domains/([^/]+)/apache>
  AllowOverride None 
  Options FollowSymLinks ExecCGI
  Order deny,allow
  Allow from all
</DirectoryMatch>

<Directory /mnt/data/www/iitcms/media>
  AllowOverride None
  Options Indexes FollowSymLinks MultiViews 
  Order allow,deny 
  Allow from all 
</Directory>

<DirectoryMatch ^/mnt/data/www/domains/([^/]+)/media/uploads>
  AllowOverride None
  Options Indexes FollowSymLinks MultiViews 
  Order allow,deny 
  Allow from all 
</DirectoryMatch>

I know the part i did with mod_rewrite doesn’t work, couldn’t really say why not but that’s not as important so far, I am curious how could i write the WSGIScriptAliasMatch line so that to accomplish my objective.
I would be very grateful for any help, or any other ideas related to how i can deal with this. Also it would be great if I’d manage to get each site to run in wsgi daemon mode, thou that is not as important.

Thanks,
Virgil

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:32:56+00:00Added an answer on May 14, 2026 at 12:32 am

    Discussion thread about this at:

    http://groups.google.com/group/modwsgi/browse_frm/thread/2a9905f24c10a967

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to configure my local Apache2 server to host several Symfony websites using
I'm trying to access user's language preference w/o using server code. I'm looking for
I'm trying to configure org.apache.commons.dbcp.BasicDataSource as bean in web.xml under a tomcat project using
I am trying to configure SSL on my localhost using apache and phusion passenger.
Im trying to configure a .htaccess RewriteRule and i'm struggling. I have a domain
I'm trying to configure a splashscreen for a landscape mode ipad app using phonegap
I'm trying to configure net.pipe bindings on the server between 2 processes (on the
I'm trying to configure logging for a Django app using the Python logging module.
Whole this day I was trying to configure django on production server. I use
I'm trying to use setup the rails application on apache2 using the virtual server

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.