On 04/30/2012 12:30 AM, Jonathan Vanasco wrote:
I'm trying to integrate custom domains for a webapp that I've been
building in my spare time.

I can think of 2 ways of implementing this:

1. in nginx have a wildcard 'listen', then use url rewrite rules to
map the custom URLS onto 'non-custom' webapp urls.    ie
MyCustomDomain.com ->  webapp.com/splash/{custom_domain}

2. in nginx have a wildcard 'listen', but don't change the urls. plug
into the routes system or use event listeners to route appropriately

The first idea seems the straightforward easy way.  The second sounds
like it's overly complicated.

Am I right or is there a better option?

I don't have a great suggestion for urldispatch based apps, but for traversal based apps this is handled fairly naturally with a combination of a rewrite rule and a virtual root ala <http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/narr/vhosting.html#virtual-root-support>

- C

--
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to