My goal is to be able to easily deploy new instances of my (RESTful/JSON)
Pylons application, without having to create new subdomains for each
application. Right now I have multiple subdomains, each of which Apache is
proxying to different instances of the same Pylons application. For
example, abc.mydomain.com resolves to a Pylons app whose production.ini
config file is located at ~/myapps/abc and xyz.mydomain.com resolves to a
Pylons app whose production.ini config file is located at ~/myapps/xyz, etc.
The approach that I am hoping to use is to have a setup where
mydomain.com/abc and mydomain.com/xyz resolve to the apps at ~/myapps/abc
and ~/myapps/xyz, respectively. Is this possible? Can somebody help me
achieve this?
My Apache virtualhost looks like this:
<VirtualHost *>
ServerName mydomain.com
ServerAlias mydomain.com
# Logfiles
ErrorLog /home/me/myapps/abc/log/error.log
CustomLog /home/me/myapps/abc/log/access.log combined
# Proxy
ProxyPass /abc http://localhost:9000/ retry=5
ProxyPassReverse /abc http://localhost:9000/
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
</VirtualHost>
My production.ini file's relevant parts look like this:
[server:main]
use = egg:Paste#http
host = 127.0.0.1
port = 9000
[app:main]
use = egg:mypylonsapp
filter-with = proxy-prefix
[filter:proxy-prefix]
use = egg:PasteDeploy#prefix
prefix = /abc
However when I do a GET request to http://mydomain.com/abc/resources I can
tell that my error controller is returning a response, indicating that my
routes are trying to parse the "/abc" part. But that shouldn't be
happening, right?
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.