Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » apache configuration to get host to use portals app/url within django project [RSS Feed]

#1 June 19, 2010 21:23:41

w.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

apache configuration to get host to use portals app/url within django project


I have searched these forums and online for an answer to this
question, but I'm not sure about the best practice.

We are using django 1.2.1 with apache and mod_python on ubuntu. We
have created a portals app within a django project to handle
customized portals (with hosts like portal1.oursite.com). We would
like to use the same django settings.py file for the the entire
project.

I'm not sure that the Sites framework necessarily addresses this need,
since we want the portals app to apply various configuration
parameters dynamically based on the host (portal1.oursite.com, etc.)
-- but within the same django project with a single settings.py file.

So if a request comes in for portal1.oursite.com, we would like apache
and mod_python to serve that request from the portals app, which in
turn lives with other apps in our www.oursite.com django project.
Example:
- oursite_djangoproject
- locations_app
- portals_app
- store_app
- etc.

Is this just a matter of using apache's mod_rewrite to redirect
requests with non www subdomains of oursite.com to
www.oursite.com/portals/<subdomain>/rest/of/url/path -- or is there a
better way? I guess this would mean we would need to change our
virtual host setting to a wildcard apache virtual host like
*.oursite.com and then some weird mod_rewrite stuff to get the non-www
subdomains to secretly have /portals/ and the subdomain appended to
the path. We would *not* want public URLs like portal1.oursite.com/
portals/portal1/rest/of/url/. We would want portal1.oursite.com/rest/
of/url/.

Does that make any sense?

Thanks for any guidance. And sorry if this is more an apache question
than a django one.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » apache configuration to get host to use portals app/url within django project [RSS Feed]

Board footer

Moderator control

Enjoy the 18th of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support