jwing wrote:
> Hi all, I just moved to Django from Pylons. Django never ceases to
> amaze me so far, but when I tried to deploy my app on apache
> (fastcgi), I got the rewrite issue with no any corresponding solution
> via Google, well, I can't find it at least :(
> 
> I Got:
> 1) several apps under project "demo" (app1, app2, etc);
> 
> 2) domain http://app1.demo.com;
> 
> 3) many reversed url addresses (by urlresolvers.reverse method) which
> are being passed to templates via AJAX calls, in app1, say profile
> page, the reversed url will be "/app1/profile"
> 
> 4) here is my VirtualHost settings
> FastCGIExternalServer /home/host/app1/app1.fcgi -socket /home/host/
> app1/run/app1.socket
> <VirtualHost *:80>
>     ServerName    app1.demo.com
>     DocumentRoot  /home/host/app1
>     Alias /media  /home/host/app1/media
>     LogLevel warn
>     ErrorLog      /home/host/app1/log/error.log
>     CustomLog     /home/host/app1/log/access.log common
>     RewriteEngine On
>     RewriteRule ^/(media.*)$ /$1 [QSA,L,PT]
>     RewriteRule ^/js/(.*)$ /media/js/$1 [QSA,L,PT]
>     RewriteRule ^/css/(.*)$ /media/css/$1 [QSA,L,PT]
>     RewriteRule ^/img/(.*)$ /media/img/$1 [QSA,L,PT]
>     RewriteCond %{REQUEST_FILENAME} !-f
>     RewriteRule ^/(.*)$ /app1.fcgi/$1 [QSA,L]
> </VirtualHost>
> 
> 
> I wanna: get rid of "/app1", using http://app1.demo.com instead of
> http://app1.demo.com/app1
> 
> Replacing "/app1.fcgi/$1" with "/app1.fcgi/app1$1" works partially,
> but not for those reversed url addresses. Adding "SCRIPT_URL" rewrite
> rule which mentioned by Django doc doesn't work for me either. Anyone
> has ever met this before?
> 
I suspect each site should be a separate project: this would avoid the
app directory name being inserted at the top level as it is now. With a
separate settings file for each site you can then use the sites
subsystem the way it was intended if you want to share content.

regards
 Steve

regards
 Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC              http://www.holdenweb.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to