Opened 16 years ago
Closed 15 years ago
#11086 closed (worksforme)
Django not recieveing the mountpoint when using mod_wsgi
Reported by: | emperorcezar | Owned by: | nobody |
---|---|---|---|
Component: | Uncategorized | Version: | 1.0 |
Severity: | Keywords: | ||
Cc: | Graham.Dumpleton@… | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
This is only occurring with multiple mountpoints. Below you will find my config. /password isn't being passed the /password when used in my url. For example. When I go to the url http://example.com/password/update/ django only gets the path /update/
When using the second mount point it gets passed the entire url.
I'm able to work around this using the workaround mentioned in the Integration Documentation to get /password to be passed.
I'm not sure what is correct, for it to be passed or not, but I'm pretty sure that it should be consistent for each mountpoint.
My config, all in the same virtual host.
WSGIDaemonProcess password WSGIProcessGroup password WSGIReloadMechanism Process WSGIScriptAlias /password /example/migrationpassword/apache/django.wsgi Alias /media/ /example/migrationpassword/media/ WSGIDaemonProcess endofyearshow WSGIProcessGroup endofyearshow WSGIReloadMechanism Process WSGIScriptAlias /endofyearshow /example/endofyearshow/apache/django.wsgi Alias /media/ /example/endofyearshow/static/
Change History (2)
comment:1 by , 16 years ago
Cc: | added |
---|
comment:2 by , 15 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Marking worksforme based on the lack of any followup to Graham's comments.
As per WSGI specification, the mount point gets passed in SCRIPT_NAME, with remainder of the URL in PATH_INFO. So, the mount point should never appear in the path used within application to resolve stuff. As such, your comment that in your view it is working how you expect for '/endofyearshow' is a bit suspect. The only time that this may get stuffed up is if you aren't using Django 1.0+ for both applications and one was actually running an older version of Django where Django did things a bit differently and didn't honour the mount point specified in SCRIPT_NAME.
So, state what versions of Django is being used for each. Then also add the following at end of each WSGI script file. Use that to determine what SCRIPT_NAME and PATH_INFO are for each instance and post details.
Also perhaps post what you have in urls.py so can see if you are correctly setting up rules such that they do not mention the mount point.