Best practice would be that Django site would be mounted at same sub URL on backend system as it is on the front end and then you wouldn't need to set FORCE_SCRIPT_NAME.
If you don't do that and use FORCE_SCRIPT_NAME on the back end such that it is different to reality, then you would never be able to access directly the back end and be confident it would work properly for embedded or redirected URLs. Graham On 4 January 2012 06:24, dchandek <[email protected]> wrote: > This statement isn't strictly true: "... there should never be a need to set > 'FORCE_SCRIPT_NAME in Django settings file when using mod_wsgi. If you find > yourself having to do that, you have done something wrong with configuring > mod_wsgi or you have incorrectly set up your patterns in your 'urls.py' > file." > > An example where you may legitimately need FORCE_SCRIPT_NAME is when the > Apache/mod_wsgi/Django server is behind a reverse proxy and the backend URL > path differs from the frontend server URL path. Without FORCE_SCRIPT_NAME > (or some other way of munging), Django won't generate (some) URLs properly > for the proxy server. > > I assume the intent of the doc statement is that you shouldn't use > FORCE_SCRIPT_NAME to "correct" anything specifically related to mod_wsgi. > Just wanted to point out this nuance. > > Cheers, > David > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/modwsgi/-/0PTNm1ldIEsJ. > 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/modwsgi?hl=en. -- You received this message because you are subscribed to the Google Groups "modwsgi" 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/modwsgi?hl=en.
