Commit 17a278c1 authored by Laurent Bachelier's avatar Laurent Bachelier

Add configuration documentation for lighttpd+cgi

parent 11453004
......@@ -130,3 +130,44 @@ Now, connect as this user::
http://127.0.0.1:8042/?authkey=455b00b1e5
Open the URL. You can now access the file!
Configuration
-------------
Lighttpd, CGI
~~~~~~~~~~~~~
This mode is not the best for performance, but it won't take any memory when not used.
You will need to load the ``alias``, ``setenv`` and ``cgi`` modules for this setup to work.
If they are not loaded, the following directives will be ignored.
Let's say you want http://your.host/data/ to be served by Ass2m. Add this to your ``lighttpd.conf``::
$HTTP["host"] == "your.host" {
$HTTP["url"] =~ "^/data" {
# make everything go through ass2m
alias.url = ( "" => "/usr/share/ass2m/scripts/ass2m.cgi" )
cgi.assign = ( "ass2m.cgi" => "" )
# configure ass2m
setenv.add-environment = (
"FORCE_SCRIPT_NAME" => "/data",
"ASS2M_ROOT" => "/path/to/the/work/dir",
)
}
}
Please adjust the paths. You can make use of the ``setenv`` directive to set a different ``PYTHONPATH``.
The should be no ``/`` at the end of the value of ``FORCE_SCRIPT_NAME``.
If you just want a whole host to be served by Ass2m, you can use a simpler configuration::
$HTTP["host"] == "your.host" {
# make everything go through ass2m
alias.url = ( "" => "/usr/share/ass2m/scripts/ass2m.cgi" )
cgi.assign = ( "ass2m.cgi" => "" )
# configure ass2m
setenv.add-environment = (
"ASS2M_ROOT" => "/path/to/the/work/dir",
)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment