Changeset 2650 for package_branches


Ignore:
Timestamp:
Dec 20, 2009, 4:03:12 PM (15 years ago)
Author:
broder
Message:

Fix the unauthenticated web interface.

Separate the separate components of the web app by the authenticated
webapp class at /auth and the unauthenticated app at /unauth.

These are purely internal URLs, but used to allow a single CherryPy?
instance to serve both the authenticated and unauthenticated website.

Location:
package_branches/invirt-web/cherrypy
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • package_branches/invirt-web/cherrypy/code/main.fcgi

    r2521 r2650  
    3131    else:
    3232        conf_file = os.path.join(base_dir, 'main.conf')
    33     app = cherrypy.tree.mount(InvirtWeb(),
    34         '/',
    35         {'/':      {'tools.staticdir.root': static_dir,
    36                     'tools.invirtwebstate.on': True},
    37         '/static': {'tools.staticdir.on': True,
    38                     'tools.staticdir.dir': static_dir}
    39          })
    40     app.merge(conf_file)
     33
     34    app_config = {
     35        '/': {
     36            'tools.invirtwebstate.on': True,
     37            },
     38        '/static': {
     39            'tools.staticdir.root': static_dir,
     40            'tools.staticdir.on': True,
     41            'tools.staticdir.dir': static_dir,
     42            }
     43        }
     44                   
     45    authApp = cherrypy.tree.mount(InvirtWeb(),
     46                                  '/auth',
     47                                  app_config)
     48    authApp.merge(conf_file)
    4149    unauthApp = cherrypy.tree.mount(InvirtUnauthWeb(),
    4250                                    '/unauth',
    43                                     {'/': {'tools.invirtwebstate.on': True}})
     51                                    app_config)
    4452    unauthApp.merge(conf_file)
    4553    cherrypy.config.update(conf_file)
  • package_branches/invirt-web/cherrypy/files/etc/apache2/sites-available/default.mako

    r2649 r2650  
    2424        RewriteRule ^/invirt - [L]
    2525        RewriteRule ^/kill.cgi - [L]
    26         RewriteRule ^/(.*) /var/www/invirt-web/main.fcgi/$1 [L]
     26        RewriteRule ^/(.*) /var/www/invirt-web/main.fcgi/unauth/$1 [L]
    2727
    2828        ErrorLog /var/log/apache2/error.log
  • package_branches/invirt-web/cherrypy/files/etc/apache2/sites-available/ssl.mako

    r2649 r2650  
    2727        RewriteRule ^/trac(.*) ${tracuri}$1 [R,L]
    2828        RewriteRule ^/kill.cgi - [L]
    29         RewriteRule ^/(.*) /var/www/invirt-web/main.fcgi/$1 [L]
     29        RewriteRule ^/(.*) /var/www/invirt-web/main.fcgi/auth/$1 [L]
    3030
    3131        RewriteLog /var/log/apache2/rewrite.log
Note: See TracChangeset for help on using the changeset viewer.