Re: Django + mod_wsgi url rewriting issue

2012-09-20 Thread Sebastiaan Snoeckx


> I use something like that... i mean, for example if /foo/bar must to 
> execute with django the url must to be example.com/site.wsgi/foo/bar 
> (continue with the example of serverfault)... if you follow 
> example.com/foo/bar apache use your statics files. 
>
> (this part of my production virtualhost) 
>
> WSGIDaemonProcess domain.com processes=2 threads=15 display-name=%{GROUP} 
> WSGIProcessGroup domain.com 
> WSGIScriptAlias /dj /home/path/to/site/django/wsgi/django.wsgi 
>
> Alias /media/ /home/path/to/site/django/src/project/media/ 
> Alias /static/admin/ /home/path/to/site/django/src/project/static/admin/ 
>
> (End Virtualhost example) 
>
> Following my example i have an urlconf to see news: 
> url( r'^/news/', 'news-site' ), 
>
> but clients must to put http://www.mydomain.com/dj/news/  so apache 
> see that you put /dj in yours url... so execute django.wsgi... urlconf 
> see news in the url so execute news-site view. 
>
>
> Sorry about my english i hope that help you 
>
 > 

Well... first of all, my static files are not in separate '/static/' 
directories or on a separate server or anything (hence the RewriteCond), 
and secondly, the problem is that even when I do 
"example.com/site.wsgi/foo/" it still won't work and i only get my default 
view... always... as a matter of fact, instead of returning a Django error 
when I enter a known bogus address, it still shows my default view.

Btw, I'm unsure about the terminology here, but 'default view' is simply 
"url(r'', 'app.views.show_index')" which shouldn't actually match anything 
(just an empty GET) -- meaning the GET request is stripped by Django for 
some reason? that or there's a mistake in my RewriteRule.

I'm really stuck with this... :(

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/hmE103VGlEIJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django + mod_wsgi url rewriting issue

2012-09-19 Thread Rafael E. Ferrero
I use something like that... i mean, for example if /foo/bar must to
execute with django the url must to be example.com/site.wsgi/foo/bar
(continue with the example of serverfault)... if you follow
example.com/foo/bar apache use your statics files.

(this part of my production virtualhost)

WSGIDaemonProcess domain.com processes=2 threads=15 display-name=%{GROUP}
WSGIProcessGroup domain.com
WSGIScriptAlias /dj /home/path/to/site/django/wsgi/django.wsgi

Alias /media/ /home/path/to/site/django/src/project/media/
Alias /static/admin/ /home/path/to/site/django/src/project/static/admin/

(End Virtualhost example)

Following my example i have an urlconf to see news:
url( r'^/news/', 'news-site' ),

but clients must to put http://www.mydomain.com/dj/news/  so apache
see that you put /dj in yours url... so execute django.wsgi... urlconf
see news in the url so execute news-site view.


Sorry about my english i hope that help you


2012/9/18 Sebastiaan Snoeckx :
> Hello list
>
> I used mod_wsgi to setup my site to rewrite urls according to
>  but now my app doesn't seem to follow
> its urlconf anymore. Every single request to the wsgi application just
> returns my default (index) view. example.com/, example.com/a/,
> example.com/foo/bar... it's all my default view, no other views work...
>
> Is there some setting (I heard something about a faulty SCRIPT_NAME? but
> I'm unsure about that) I'm missing or how does Django find out the
> original request from the rewritten URI?
>
> Maybe I'm not very clear, so feel free to ask for more information.
>
> Thanks in advance
>
>
>
>



--
Rafael E. Ferrero
Claro: (03562) 15514856

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Django + mod_wsgi url rewriting issue

2012-09-18 Thread Sebastiaan Snoeckx

Hello list

I used mod_wsgi to setup my site to rewrite urls according to
 but now my app doesn't seem to follow
its urlconf anymore. Every single request to the wsgi application just
returns my default (index) view. example.com/, example.com/a/,
example.com/foo/bar... it's all my default view, no other views work...

Is there some setting (I heard something about a faulty SCRIPT_NAME? but
I'm unsure about that) I'm missing or how does Django find out the
original request from the rewritten URI?

Maybe I'm not very clear, so feel free to ask for more information.

Thanks in advance






smime.p7s
Description: S/MIME Cryptographic Signature