File system structure

|- var
|   |- lib
|   |   |- fit14
|   |   |   |- extensions
|   |   |   |   |- {myGlobalExtension}
|   |   |   |   |   |- public
|   |   |   |   |   |   |- ...
|   |   |   |   |   |- ...
|   |   |   |   |- ...
|   |   |   |- projects
|   |   |   |   |- {myProject}
|   |   |   |   |   |- sites
|   |   |   |   |   |   |- {mySite}
|   |   |   |   |   |   |   |- conf
|   |   |   |   |   |   |   |   |- acl.xml
|   |   |   |   |   |   |   |   |- config.xml
|   |   |   |   |   |   |   |   |- flow.xml
|   |   |   |   |   |   |   |   |- sources.xml
|   |   |   |   |   |   |   |   |- urlmap.xml
|   |   |   |   |   |   |   |   |- ...
|   |   |   |   |   |   |   |- public
|   |   |   |   |   |   |   |   |- index.html
|   |   |   |   |   |   |   |   |- ...
|   |   |   |   |   |   |   |- ...
|   |   |   |   |   |   |- ...
|   |   |   |   |   |- extensions
|   |   |   |   |   |   |- {myProjectExtension}
|   |   |   |   |   |   |   |- public
|   |   |   |   |   |   |   |   |- ...
|   |   |   |   |   |   |   |- ...
|   |   |   |   |   |   |- ...
|   |   |   |   |   |- public
|   |   |   |   |   |   |- ...
|   |   |   |   |   |- ...
|   |   |   |   |- ...
|   |   |   |- ...

FIT protocol

Local files are accessible through the fit: protocol (FIDJ):

  • fit://site maps to the current site directory (e.g. /var/lib/fit14/{myProject}/sites/{mySite})
  • fit://local maps to the public directory of the current site (e.g. /var/lib/fit14/{myProject}/sites/{mySite}/public)
  • fit://project maps to the current project directory (e.g. /var/lib/fit14/{myProject}/)
  • fit://extension/{myExtension} maps to the {myExtension} extension directory (e.g. /var/lib/fit14/extensions/{myExtension}/)

Local file serving

fit://local, fit://site/public, fit://project/public and fit://extension/{myExtension}/public are considered public and may be used as “backends” serving local files. ACLs always allow access to these directories. fit://site/public/ is used as the default backend, if no URL map is defined.

fit://local is an alias for fit://site/public that makes it possible to use host-relative URLs (starting with /) to link between files.

When used in a request action, an HTTP response is synthesized for these URLs. A response for an existing file will have status code 200 and the following headers:

  • Content-Type as determined by the file’s extension or by content sniffing
  • Content-Length according to the file’s size
  • Last-Modified according to file’s mtime as reported by the file system

Requests for a directory, such as fit://local/assets/, will be satisfied by the index documents index.html or index.xml. If none of these exist, a 403 error is issued. Requests for non-existing files result in a 404 reply. By default, error responses have no body. If configured, the request error document will be used instead.

FIDJ Translator

Content about to be sent to the client is scanned for remaining FIDJ URIs. Public URIs are rewritten to HTTP/S (according to the current request’s protocol), whereas all non-public URIs (e.g. fit://site/conf/) are removed from the output. This behavior is controlled by the translate-fidj option.