def METHOD_NAME():
    # Set up site
    cherrypy.config.update({
        'tools.proxy.on': True,
        'tools.proxy.base': 'www.mydomain.test',
    })
    # Set up application
    class Root:
        def __init__(self, sn):
            # Calculate a URL outside of any requests.
            self.thisnewpage = cherrypy.url(
                '/this/new/page', script_name=sn)
        @cherrypy.expose
        def pageurl(self):
            return self.thisnewpage
        @cherrypy.expose
        def index(self):
            raise cherrypy.HTTPRedirect('dummy')
        @cherrypy.expose
        def remoteip(self):
            return cherrypy.request.remote.ip
        @cherrypy.expose
        @cherrypy.config(**{
            'tools.proxy.local': 'X-Host',
            'tools.trailing_slash.extra': True,
        })
        def xhost(self):
            raise cherrypy.HTTPRedirect('blah')
        @cherrypy.expose
        def base(self):
            return cherrypy.request.base
        @cherrypy.expose
        @cherrypy.config(**{'tools.proxy.scheme': 'X-Forwarded-Ssl'})
        def ssl(self):
            return cherrypy.request.base
        @cherrypy.expose
        def newurl(self):
            return ("Browse to <a href='%s'>this page</a>."
                    % cherrypy.url('/this/new/page'))
        @cherrypy.expose
        @cherrypy.config(**{
            'tools.proxy.base': None,
        })
        def base_no_base(self):
            return cherrypy.request.base
    for sn in script_names:
        cherrypy.tree.mount(Root(sn), sn)