Permalink
Browse files

- changed all views to include from "includes" instead of "/includes"…

… so that example-site can work in a non-root location

- updated INSTALL with example on how to get Dragonfly running on apache in non-root
- fixed issue with $GET
  • Loading branch information...
1 parent 7373412 commit f1ff18cc456e64f867b76da533ed38130d70eaab @taoeffect committed Oct 23, 2009
View
@@ -35,6 +35,9 @@ And on your webserver that is represented by this folder (called the "site root"
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 =
================================
@@ -47,5 +50,43 @@ 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:
-TODO: discuss installing and using plugins.
+ #!/usr/bin/env newlisp
+To:
+ #!/path/to/bin/newlisp
View
@@ -5,3 +5,5 @@ Congratulations on choosing Dragonfly!
newlisp -d 8080 -w . -http
Open Your browser and type localhost:8080 - have FUN!
+
+For installation information see INSTALL.
@@ -36,11 +36,12 @@
(replace REGEX_HEX_ENCODED_CHAR str (char (int (string "0x" $1))) 0x10000)
)
-(constant 'REGEX_QUERY (regex-comp {&([^&=]+?)=?([^&=]*?)(?=&|$)} 1))
+(constant 'REGEX_QUERY (regex-comp {&([^&=]+)=?([^&=]*?)(?=&|$)} 1))
(define (parse-query query)
(when (starts-with query "?") (pop query))
(push "&" query)
+ (DF:log-debug "parsing query: " query " => " (find-all REGEX_QUERY query (list $1 (url-decode $2)) 0x10000))
(find-all REGEX_QUERY query (list $1 (url-decode $2)) 0x10000)
)
@@ -102,7 +103,7 @@
(dolist (pair (parse-query temp))
($POST (first pair) (last pair))
)
- ; TODO: log an error here
+ (DF:log-err "couldn't get POST info!")
)
)
@@ -122,7 +122,7 @@
<li>Pid of running newLISP process: "(sys-info 6)"</li>
<li>Version number as an integer constant: "(sys-info 7)"</li>
<li>Operating system constant: "(sys-info 8)"</li>
- <li>Used symbols in Dragonfly: <pre>"(symbols 'Dragonfly)"</pre></li>
+ <li>Used symbols in Dragonfly: <div style=\"width: 474px;\">"(symbols 'Dragonfly)"</div></li>
<li>Last system error: "(sys-error)"</li>
</ul>
@@ -38,6 +38,6 @@ div.bubble cite {
margin: 0px;
padding: 7px 0px 0px 15px;
top: 6px;
- background: transparent url(/includes/images/tip.gif) no-repeat 20px 0;
+ background: transparent url(includes/images/tip.gif) no-repeat 20px 0;
font-style: normal;
}
@@ -15,7 +15,7 @@
<p><% (title "| marchildmann.com") %><p>
</div>
- <img src="/includes/images/houses.jpg" class="border" alt="Houses" width="474" height="267"/>
+ <img src="includes/images/houses.jpg" class="border" alt="Houses" width="474" height="267"/>
<h1>We did the best we can ...</h1>
@@ -15,7 +15,7 @@
<p><% (title "| Dragonfly web framework") %><p>
</div>
- <img src="/includes/images/houses.jpg" class="border" alt="Houses" width="474" height="267"/>
+ <img src="includes/images/houses.jpg" class="border" alt="Houses" width="474" height="267"/>
<h1>Introduction</h1>
<p class="extract">Dragonfly is a <b>web framework for newLISP</b>. Development started in June 2009. It focuses on <b>speed</b>, small memory consumption and a <b>small learning curve</b>. Other goodies are a plug and play architecture for writing own helpers or modules and a very <b>easy deployment</b>. It's possible to use it with the builtin newLISP webserver.
@@ -2,7 +2,7 @@
<title><% (title "Dragonfly web framework - User Guide") %></title>
<% (meta "author" "Marc Hildmann") %>
<% (meta "keywords" "newlisp, framework, dragonfly, web framework") %>
- <% (css "screen" "/includes/css/screen.css") %>
- <% (script "/includes/js/dragonfly.js") %>
+ <% (css "screen" "includes/css/screen.css") %>
+ <% (script "includes/js/dragonfly.js") %>
<% (rss "Dragonfly web framework RSS Feed" "/dragonfly_rssfeed/xml") %>
</head>
@@ -1,5 +1,5 @@
<!-- BEGIN NAVIGATION -->
-<img src="/includes/images/marchildmann-com.gif" alt="MarcHildmann.com" width="474" height="50"/>
+<img src="includes/images/marchildmann-com.gif" alt="MarcHildmann.com" width="474" height="50"/>
<ul>
<li>
<a href="index.html" onclick="toggleMenu(); return false;" id="guidesMenu">Dragonfly web framework</a>

0 comments on commit f1ff18c

Please sign in to comment.