For reasons out of my control, I have to install web2py using mod_python. 
So I configured the following in an apache vhost file:

        Alias / /opt/web2py/
        <Location />
                SetHandler python-program
                PythonHandler modpythonhandler
                PythonPath "sys.path+['/opt/web2py']"
                #PythonOption SCRIPT_NAME /welcome
                PythonDebug On

                AllowOverride None
                Options -Indexes FollowSymLinks
                Order Allow,Deny
                Allow from all
        </Location>

I tried a number of combinations of PythonOption SCRIPT_NAME but have not 
been able to get an anything, such as the "welcome" application. Going to / 
on this server redirects me to "welcome/default/index" which then gives me 
an "invalid request" message.

So I found the line in gluon/main.py that generated the "invalid request" 
message and changed it to this:

% ('invalid request, app = %s, request.folder = %s' % (app, 
request.folder)),


Which gives me the application name and the folder. Here is what I get then:

invalid request, app = default, request.folder = 
/opt/netapps/web2py/applications/default/


It seems that something is not parsing the URL right since the URL is:

http://<server-host-name>/welcome/default/index


 

-- 



Reply via email to