Ignore:
Timestamp:
Dec 20, 2009, 9:48:06 PM (15 years ago)
Author:
broder
Message:

Use separate fcgi files for the authed and unauthed site.

This allows both of them to be mounted on / in their respective
CherryPy? apps, which in turn eliminates any discrepancy between
"internal URLs" and "external URLs".

Location:
package_branches/invirt-web/cherrypy-rebased
Files:
2 edited
1 copied
1 moved

Legend:

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

    r2728 r2729  
    11#!/usr/bin/python
    2 """Main FastCGI entry point for web interface"""
     2"""Main FastCGI entry point for authenticated web interface"""
    33
    44import cherrypy
    55import os
    66import sys
    7 from main import InvirtWeb, InvirtUnauthWeb
     7from main import InvirtWeb
    88
    99dev = False
     
    4343        }
    4444                   
    45     authApp = cherrypy.tree.mount(InvirtWeb(),
    46                                   '/auth',
    47                                   app_config)
    48     authApp.merge(conf_file)
    49     unauthApp = cherrypy.tree.mount(InvirtUnauthWeb(),
    50                                     '/unauth',
    51                                     app_config)
    52     unauthApp.merge(conf_file)
     45    app = cherrypy.tree.mount(InvirtWeb(),
     46                              '/',
     47                              app_config)
     48    app.merge(conf_file)
    5349    cherrypy.config.update(conf_file)
    5450
  • package_branches/invirt-web/cherrypy-rebased/code/unauth.fcgi

    r2728 r2729  
    11#!/usr/bin/python
    2 """Main FastCGI entry point for web interface"""
     2"""Main FastCGI entry point for unauthenticated web interface"""
    33
    44import cherrypy
    55import os
    66import sys
    7 from main import InvirtWeb, InvirtUnauthWeb
     7from main import InvirtUnauthWeb
    88
    99dev = False
     
    4343        }
    4444                   
    45     authApp = cherrypy.tree.mount(InvirtWeb(),
    46                                   '/auth',
    47                                   app_config)
    48     authApp.merge(conf_file)
    49     unauthApp = cherrypy.tree.mount(InvirtUnauthWeb(),
    50                                     '/unauth',
    51                                     app_config)
    52     unauthApp.merge(conf_file)
     45    app = cherrypy.tree.mount(InvirtUnauthWeb(),
     46                              '/',
     47                              app_config)
     48    app.merge(conf_file)
    5349    cherrypy.config.update(conf_file)
    5450
  • package_branches/invirt-web/cherrypy-rebased/files/etc/apache2/sites-available/default.mako

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

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