From 8ab015670b3ff77b407bce05cb91e7ffb824a3ef Mon Sep 17 00:00:00 2001 From: nekobit Date: Thu, 21 Jul 2022 22:32:48 +0000 Subject: [PATCH] Update documentation FossilOrigin-Name: 2d30985f1372881742aecd1a74547c608bb2b100d6667f534dcb4148e7b97e2d --- docs/INSTALL.md | 57 +++++++++++++++++--------------- docs/sample/treebird.apache.conf | 4 --- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 7d79e24..3a942ec 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -1,58 +1,63 @@ # Installing Treebird +This is a stub and isn't complete, please update it! + ## Compiling For the following GNU/Linux distributions, you will need the following libraries/packages: -- libcurl - - Debian: `libcurl4-gnutls-dev` - - Arch: `curl` - - Void: `libcurl libcurl-devel` -- libpcre2 - - Debian: `libpcre2-dev` - - Void: `pcre2 pcre2-devel` -- libfcgi - - Debian: `libfcgi-dev` - - Void: `fcgi fcgi-devel` +###### Debian + +`# apt install libcurl4-gnutls-dev libpcre2-dev libfcgi-dev base-devel` + +###### Void GNU/Linux + +`# xbps-install libcurl libcurl-devel base-devel pcre2 pcre2-devel fcgi fcgi-devel` + +###### Arch + +`# pacman -S curl base-devel` Create a copy of `config.def.h` at `config.h`, edit the file with your information Run `make`. This will also clone mastodont-c, and compile both it and Treebird. -If you `git pull` any changes, `make update` should be run after updating, as it ensures -that mastodont-c is up to date. +If you `fossil update` any changes, `make update` should be run after updating ## Installation -- TODO? - -Run `make install`, this might require root. +Run `# make install` If this succeeds (assuming you used default variables), you can now find Treebird at the following - `/usr/local/share/treebird/` - Contains CSS, images, and other meta files -- `/usr/local/bin/treebird` - Regular executable CGI file, test it by running it as is, it'll spit HTML out! +- `/usr/local/bin/treebird` - Regular executable CGI file, test it by running it as is, it shouldn't spit anything out -### Using NGINX (and fcgiwrap) +### Using NGINX -Treebird can be served over nginx by using a FastCGI server such as fcgiwrap. +Treebird can be served over nginx by using a FastCGI daemon such as spawn-fcgi. The example static files will be in `/usr/local/share/treebird/`, with `treebird.cgi` at `/usr/local/bin/treebird`. After running `make`, Treebird's files will be in the `dist/` directory. _Copy_, ***DO NOT MOVE***, **everything but treebird.cgi** of this folder to your web server. Copy `treebird.cgi` to another directory of your choosing. -#### nginx -An example nginx configuration is available in [treebird.nginx.conf](./sample/treebird.nginx.conf). +## Nginx +An example Nginx configuration is available in [treebird.nginx.conf](./sample/treebird.nginx.conf). * Make sure to change `example.com` to your instance's domain. * Make sure to change the `root` to wherever the static files are being stored -#### fcgiwrap -fcgiwrap can be installed on debian with `sudo apt install fcgiwrap`. +## Using Apache and mod_proxy_fcgi -The example is using the default configuration included with the `fcgiwrap` package on Debian. +Apache hasn't caused many troubles, and is in fact, what I use for development. You can see how to start +spawn-fcgi in `scripts/fcgistarter.sh`. -### Using Apache and mod_proxy_fcgi +Example Apache configuration is available in [treebird.apache.conf](./sample/treebird.apache.conf). -TODO +#### spawn-fcgi -Example Apache configuration is available in [treebird.apache.conf](./sample/treebird.apache.conf). \ No newline at end of file +`spawn-fcgi` can be used for both Apache and Nginx. Read the manual for it to see how to work it, or view +the testing script at `scripts/fcgistarter.sh` + +- Please, at all costs, avoid FCGIWrap. It's caused nothing but headaches and has proved no real use other than + spitting `Cannot get script name, are DOCUMENT_ROOT and SCRIPT_NAME (or SCRIPT_FILENAME) set and is the script executable?` + at you (even if those variables are set and the script is executable) diff --git a/docs/sample/treebird.apache.conf b/docs/sample/treebird.apache.conf index 2a469b2..770988a 100644 --- a/docs/sample/treebird.apache.conf +++ b/docs/sample/treebird.apache.conf @@ -1,7 +1,3 @@ -# TODO a lot of things -# THIS IS UNTESTED AND INCOMPLETE, ITS JUST FOR REFERENCE - -# Give access to our directory Require all granted