Setup example | Dragonfly web framework

Dragonfly in Non-Root

Say you want to test Dragonfly out by placing the entire directory into the root of your site. As an example the demo site could be located here:


And to access it you would use this URL:

Step 1: Update the .htaccess file

The .htaccess file is a hidden file located inside the example-site folder.
Change this line in .htaccess:

RewriteBase /


RewriteBase /dragonfly/example-site/

Step 2: Update Dragonfly's configuration

In example-site/dragonfly-framework you'll find the file config.lsp.
Change this line:

(constant (global 'DOCUMENT_ROOT) (env "DOCUMENT_ROOT"))


(constant (global 'DOCUMENT_ROOT)

Step 3 (optional): newLISP outside from /usr/bin/

A possible third step is required if your newlisp binary is NOT installed in /usr/bin/newlisp.

If it's installed somewhere else (for example: /path/to/bin/newlisp), then you may need to also edit index.cgi file and change the top line from:

#!/usr/bin/env newlisp


Rendered in 0 milliseconds. Used 83 KB of memory, 58 KB for Lisp Cells.