WebFaction
Community site: login faq

Hi, I was wondering how I would configure such a setup.

  • I have one Custom Application (Python Paste Server) listening on localhost:123456
  • I have several sites on that Application (e.g. localhost:123456/site1, localhost:123456/site2)

I would like to map different domains to different sites:

  • site1.com -> localhost:123456/site1
  • site2.com -> localhost:123456/site2

My research/guess on what needs to be done:

  • Create an Apache Application to listen to site1.com and site2.com (via VirtualHost)
  • Change the httpd.conf file to proxy to site1 or site2 (via mod_proxy, ProxyPass, etc(

However,

  • I'm not sure how I'd go about making this 'Apache App'
  • Is there an easier way to accomplish what I'm trying to do?

Thanks for your time.

asked 05 Oct '11, 11:02

gsg
112
accept rate: 0%

edited 06 Oct '11, 08:05


The best way to install the Apache App is use our 1 click installer, to install a mod_wsgi application. This will install the apache instance, enable Python and assign a port for your app. Then you can define your Virtual Hosts for each application that you want the apache to serve in the http.conf file. We have a tutorial in our old forums about how to do this for Django applications, but could be used as a template for any application used by apache.

This is the best solution to accomplish what you are wanting.

permanent link

answered 05 Oct '11, 14:26

timg ♦♦
1.3k4
accept rate: 30%

Hi timg,

Thanks for the directions.

I'm going to take the hybrid approach - I would like to avoid mod_wsgi for now as I cannot replicate the environment on my machine.

I installed Apache using the 1 click installer but I didn't find the mod_proxy modules. I wonder whether there's a way to add them in or will I have to compile my own apache and put them in the webapps directory.

(06 Oct '11, 08:07) gsg

You could try copying the modules you need from /usr/lib/httpd/modules/, or reference them in their current location, but there is a chance they won't work (since they were not built with your Apache instance).

If that does not work, then you'll need to build your own Apache to get your own mod_proxy modules.

(06 Oct '11, 12:50) seanf
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×128
×76
×57
×9

question asked: 05 Oct '11, 11:02

question was seen: 3,714 times

last updated: 06 Oct '11, 12:50

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM