Source

dragonfly-newlisp / INSTALL

Congratulations on choosing Dragonfly!

Setting up Dragonfly is easy, there are only two steps, copying files,
and changing the configuration to suit your site. Typically the configuration
needs no adjusting, but depending on your situation you may need to make some
adjustments.

Dragonfly requires the following to work:

      * newLISP v10.1 or greater.
      * For magic redirection Apache web server is required.

If you meet those requirements, great! If you're using a custom web server,
you might want to setup your own redirection script based on the .htaccess file.

 ==========================
 = Step 1 - Copying Files =
 ==========================

There are three things you'll need to copy into your site's root to install
Dragonfly. You'll find these files inside the 'example-site' folder.

1) The 'dragonfly-framework' folder
2) index.cgi
3) .htaccess (this file is hidden)

By "site root" we mean the folder that represents your basic web address,
for example if your website is located at:

	http://wwww.example-site.com/
	
And on your webserver that is represented by this folder (called the "site root"):

	/home/www/example-site.com/
	
Then that's the folder you'll want to copy the files into.

If you'd like Dragonfly to live somewhere else inside your site root,
see the Example step at the end of this document.

 ================================
 = Step 2 - Configure Dragonfly =
 ================================

Edit the 'config.lsp' file in dragonfly-framework.

Read through the comments (they begin with a semi-colon) for instructions on
what the settings are for.

If you want to prevent .html files from being processed through Dragonfly, open the
.htaccess file in the site root and read the comments there for how to disable that behavior.

 ===========================================================
 = Example: Testing Demo Site on Apache in Non-Root Folder =
 ===========================================================

Say you want to test Dragonfly out by placing the entire
directory into the root of your site. The demo site will then
be located here:

	<site root>/dragonfly/example-site/

And to access it you would use this URL:

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

You must make two changes (possible 3) to get it to work with Apache:

1) Change this line in .htaccess 

	RewriteBase /
To:
	RewriteBase /dragonfly/example-site/
	
2) Edit config.lsp and change this line:

	(constant (global 'DOCUMENT_ROOT) (env "DOCUMENT_ROOT"))
To:
	(constant (global 'DOCUMENT_ROOT) "/server/path/to/mysite.com/dragonfly/example-site")

	Note that "/server/path/to" is made up. You would want to use
	the absolute path to the location of the 'example-site' folder
	on your server.

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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.