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:

/home/user/mysite.com/dragonfly/example-site/

And to access it you would use this URL:

http://www.mysite.com/dragonfly/example-site

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 /

To:

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"))

To:

(constant (global 'DOCUMENT_ROOT)
          "/home/user/mysite.com/dragonfly/example-site")

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

To:

#!/path/to/bin/newlisp
Rendered in 0 milliseconds. Used 83 KB of memory, 58 KB for Lisp Cells.