Please don't chop out the preceding conversation, makes it hard to go back and copy and paste to refer to things.
So what I missed is that you are using trick of: WSGIScriptAlias "/trial/reviewboard" "E:/rbsites/trial/htdocs/reviewboard.wsgi/trial/reviewboard" whereby you include the mount point after the WSGI script file. This is quite special and not generally used. What it does is trick the Django site, even though mounted at a sub URL, to think it is mounted at the root of the web site. Anyway, the issue is still conflicts in the Apache configuration. In particular with WSGIPythonPath. Only the last WSGIPythonPath will win, overriding the first. You should not use WSGIPythonPath and instead add the directories inside of the WSGI script file. The site-packages one has to be treated in a special way. So in E:/rbsites/trial/htdocs/reviewboard.wsgi you would have something like: import sys sys.path.insert(0, 'E:/rbsites/trial') activate_this = 'D:/virtual_envs/reviewboard_2_0_13/Bin/activate_this.py' execfile(activate_this, dict(__file__=activate_this)) You will need to find where that activate_this.py file is as I don't know exactly which directory it will be in for Windows. For your other WSGI script file you would use whatever paths is appropriate for it. So get rid of WSGIPythonPath and add path in WSGI script file and activate virtual environment in there as well. Details of virtual environment activation can be found in: http://code.google.com/p/modwsgi/wiki/VirtualEnvironments Graham > http://servername/trial/reviewboard > > http://servername/testvenv > > On 23/03/2015, at 6:33 PM, Graham Dumpleton <[email protected]> > wrote: > >> As you are using WSGIPythonPath, that suggests these sites both exist at the >> top level of Apache, yet they conflict in vary ways. Problems are multiple >> DocumentRoot and WSGIPythonPath directives. Even fi you have these defined >> in separate files included into the main Apache configuration, files provide >> no way to separate them and so the latter will override parts of the former. >> >> Your WSGIScriptAlias directive also looks highly suspicious because it >> doesn't look to refer to a file, but a directory. >> >> What URL would you be using to access the site? >> >> Graham >> >> On 23/03/2015, at 6:24 PM, Shilpa Gaikwad <[email protected]> wrote: >> >>> For 2nd site it gives 404 error. mod_wsgi version is 3.5. I don't get any >>> error in Apache. >>> DJANGO_SETTINGS_MODULE is configured as following: >>> >>> os.environ['DJANGO_SETTINGS_MODULE'] = "reviewboard.settings" >>> >>> Following is my WSGI configuration in Apache >>> >>> modwsgi conf for trial site: >>> >>> DocumentRoot "E:/rbsites/trial/htdocs" >>> >>> # Error handlers >>> ErrorDocument 500 E:/rbsites/trial/rb2/htdocs/errordocs/500.html >>> >>> WSGIPassAuthorization On >>> WSGIScriptAlias "/trial/reviewboard" >>> "E:/rbsites/trial/htdocs/reviewboard.wsgi/trial/reviewboard" >>> WSGIPythonPath >>> E:/rbsites/trial;D:/virtual_envs/reviewboard_2_0_13/Lib/site-packages >>> <Directory "E:/rbsites/trial/htdocs"> >>> AllowOverride All >>> Options -Indexes +FollowSymLinks >>> Allow from all >>> </Directory> >>> >>> # Prevent the server from processing or allowing the rendering of >>> # certain file types. >>> <Location "/trial/reviewboard/media/uploaded"> >>> SetHandler None >>> Options None >>> >>> AddType text/plain .html .htm .shtml .php .php3 .php4 .php5 .phps >>> .asp >>> AddType text/plain .pl .py .fcgi .cgi .phtml .phtm .pht .jsp .sh .rb >>> >>> <IfModule mod_php5.c> >>> php_flag engine off >>> </IfModule> >>> </Location> >>> >>> # Alias static media requests to filesystem >>> Alias /trial/reviewboard/media "E:/rbsites/trial/htdocs/media" >>> Alias /trial/reviewboard/static "E:/rbsites/trial/htdocs/static" >>> Alias /trial/reviewboard/errordocs "E:/rbsites/trial/htdocs/errordocs" >>> Alias /trial/reviewboard/favicon.ico >>> "E:/rbsites/trial/htdocs/static/rb/images/favicon.png" >>> >>> modwsgi conf for testvenv site: >>> >>> >>> DocumentRoot "E:/rbsites/rbsite_venev/htdocs" >>> >>> # Error handlers >>> ErrorDocument 500 E:/rbsites/trial/rb2/htdocs/errordocs/500.html >>> >>> WSGIPassAuthorization On >>> WSGIScriptAlias "/testvenv" >>> "E:/rbsites/rbsite_venev/htdocs/reviewboard.wsgi/testvenv" >>> WSGIPythonPath >>> E:/rbsites/rbsite_venev;D:/virtual_envs/reviewboard_2_0_13/Lib/site-packages >>> <Directory "E:/rbsites/rbsite_venev/htdocs"> >>> AllowOverride All >>> Options -Indexes +FollowSymLinks >>> Allow from all >>> </Directory> >>> >>> # Prevent the server from processing or allowing the rendering of >>> # certain file types. >>> <Location "/testvenv/media/uploaded"> >>> SetHandler None >>> Options None >>> >>> AddType text/plain .html .htm .shtml .php .php3 .php4 .php5 .phps >>> .asp >>> AddType text/plain .pl .py .fcgi .cgi .phtml .phtm .pht .jsp .sh .rb >>> >>> <IfModule mod_php5.c> >>> php_flag engine off >>> </IfModule> >>> </Location> >>> >>> # Alias static media requests to filesystem >>> Alias /testvenv/media "E:/rbsites/rbsite_venev/htdocs/media" >>> Alias /testvenv/static "E:/rbsites/rbsite_venev/htdocs/static" >>> Alias /testvenv/errordocs "E:/rbsites/rbsite_venev/htdocs/errordocs" >>> Alias /testvenv/favicon.ico >>> "E:/rbsites/rbsite_venev/htdocs/static/rb/images/favicon.png" >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "modwsgi" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at http://groups.google.com/group/modwsgi. >>> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.
