The instructions on that page do not show an example of using DirectoryIndex in conjunction with WSGIScriptAlias. That is because you cant do that. Follow the example as written in the documentation. Ie., where is says:
Alias / /usr/local/wsgi/scripts/ <Directory /usr/local/wsgi/scripts> Options ExecCGI Indexes AddHandler cgi-script .cgi AddHandler wsgi-script .wsgi Order allow,deny Allow from all </Directory> Adapt that accordingly based on your paths. Thus: Alias / /home/.../WSGI/main/ <Directory /home/.../WSGI/main/> Options ExecCGI Indexes AddHandler cgi-script .cgi AddHandler wsgi-script .wsgi Order allow,deny Allow from all </Directory> Take special note of how the documentation says that DirectoryIndex can only be used for directory index generation as cant have path info associated with that. If you want WSGI application to be fallback, then you need to use rewrite rule approach that follows after that. Suggest that you now go back and read the documentation a bit more closely, paying attention to when Alias is used instead of WSGIScriptAlias. Graham On 4 July 2010 01:11, Shady <[email protected]> wrote: > Yeah, that was the initial page I read, but I guess the first part > flew right over my head. I was using the Alias and <Directory...> > method instead of mixing both together... > > Now I have: > > WSGIScriptAlias / /home/.../WSGI/main/ > > <Directory /home/.../WSGI/main/> > > DirectoryIndex index.wsgi > Order deny,allow > Allow from all > > </Directory> > > Using the above, DirectoryIndex does not work. Accessing the website > gives me "You don't have permission to access / on this server.". > > If I type in /index.wsgi, it works, but it doesn't automatically set > it as the index. I reverted to "Alias" without changing any of the > code in Directory and it worked, but as I initially stated, can it be > done using WSGIScriptAlias? > > My second question is probably more of an Apache question, but I'll > restate it in clearer terms in case it's done differently through > mod_wsgi. Is it possible to block access to a folder's original path? > > Consider the following: > > WSGIScriptAlias /user/ /home/data/type/user_data/ > WSGIScriptAlias /data/ /home/data/ > > With the above, I can access user_data through "www.url.com/user/" and > "www.url.com/data/type/user_data/". Is there anyone I can restrict > access from the latter (the actual path)? > > Thank you. > > -- > 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. > > -- 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.
