When I try to browse to favicon.ico, for instance, I get this error:
ValueError: Static tool requires an absolute filename (got 'favicon.ico')
I can get to anything in my /images, /css and /js folders. Those are serving just fine. The site looks and acts great. It's just these darn two files.
Here is my root.conf file.
[/]
tools.staticdir.on = True
tools.staticdir.root = "/projects/mysite/root"
tools.staticdir.dir = ""
[/favicon.ico]
tools.staticfile.on = True
tools.staticfile.filename = "favicon.ico"
tools.staticdir.on = True
tools.staticdir.dir = "images"
[/robots.txt]
tools.staticfile.on = True
tools.staticfile.filename = "robots.txt"
tools.staticdir.on = True
tools.staticdir.dir = ""
[/images]
tools.staticdir.on = True
tools.staticdir.dir = "images"
[/css]
tools.staticdir.on = True
tools.staticdir.dir = "css"
[/js]
tools.staticdir.on = True
tools.staticdir.dir = "js"
Here is my cherrypy.conf file:
[global]
server.socket_port = 8888
server.thread_pool = 10
tools.sessions.on = True
Here's my "startweb.py" script:
import cherrypy
from root.roothandler import Root
cherrypy.config.update("cherrypy.conf")
cherrypy.tree.mount(Root(), "/", "root/root.conf")
if hasattr(cherrypy.engine, 'block'):
# 3.1 syntax
cherrypy.engine.start()
cherrypy.engine.block()
else:
# 3.0 syntax
cherrypy.server.quickstart()
cherrypy.engine.start()