Bug #874

Static content reports "File not found" when not running from document root.

Added by Rudi Daemen almost 12 years ago. Updated almost 12 years ago.

Rudi Daemen
Target version:
Start date:
Due date:
% Done:


Estimated time:
Spent time:


The uweb page resides in the path /uweb/ and the static content resides in /uweb/static/. In, this is configured as static path:

ROUTES = (('/uweb/', 'Index'),
('/uweb/static/(.*)', 'Static'),
('/uweb/(.*)', 'FourOhFour'))

If I open the static file /uweb/static/index.html uweb reports "This is not the path you're looking for. No such file u'/uweb/static/index.html'":


#1 Updated by Elmer de Looff almost 12 years ago

  • Status changed from New to Feedback
  • Assignee set to Rudi Daemen
  • Priority changed from Low to Normal


Where does this file reside on your disk, relative to the pagemaker that fulfills your requests? The default directory from which requests are fulfilled is the 'static' directory that is in the same directory as the PageMaker is in. That is, if you your pagemaker is in '/path/to/pagemaker/', then static files will start resolving in '/path/to/pagemaker/static/'.

If you have a request for, the file tried to access would be '/path/to/pagemaker/static/index.html', with your provided route.

Does this function for you or not?

#2 Updated by Rudi Daemen almost 12 years ago

If I move the static content to the (/static/) to the folder where the pagemaker resides, it indeed functions.
I was under the impression it requested the path relative to the webdir instead of relative to the location of the pagemaker.

#3 Updated by Elmer de Looff almost 12 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 0 to 100

By default it requests from the 'static' relative directory. See also the documentation for serving static content.

I'm going to close this bug as it's not an actual bug. Should the documentation be lacking, unclear, or other suggestions / bugs be found, please open a new issue.

Also available in: Atom PDF