title: Configuring host and port in a CherryPy Python web app with more than one class
body: <p>I have a simple Cherrypy web application, including two classes. The init code looks like this:</p>
  
  <pre><code>c = MyClass()
  c.updates = AnotherClass()
  app = cherrypy.tree.mount(c, '/', 'myapp.config')
  c.setConfig(app.config)
  c.updates.setConfig(app.config)
  cherrypy.engine.start()
  cherrypy.engine.block()
  </code></pre>
  
  <p>The setConfig method for both classes is just a line of code to store some database configuration:</p>
  
  <pre><code>def setConfig(self, conf):
      self.config = conf['Database']
  </code></pre>
  
  <p>The configuration file myapp.config looks like this:</p>
  
  <pre><code>[global]
  server.socket_host = "0.0.0.0"
  server.socket_port = 80
  
  [/]
  tools.staticdir.root = com.stuff.myapp.rootDir + '/html'
  
  [Database]
  dbtable: "mydbtable"
  username: "user"
  password: "pass"
  </code></pre>
  
  <p>When I start the lot, the application gets the database config data, and correctly serves static files from the /html directory, but it only listens on localhost on 8080. I get this on the console:</p>
  
  <pre><code>[11/Apr/2013:10:03:58] ENGINE Bus STARTING
  [11/Apr/2013:10:03:58] ENGINE Started monitor thread 'Autoreloader'.
  [11/Apr/2013:10:03:58] ENGINE Started monitor thread '_TimeoutMonitor'.
  [11/Apr/2013:10:03:58] ENGINE Serving on 127.0.0.1:8080
  [11/Apr/2013:10:03:58] ENGINE Bus STARTED
  </code></pre>
  
  <p>I definitely must have done something wrong. It's as if the global part of the configuration doesn't get applied. How can I fix it?</p>