-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
99 lines (70 loc) · 2.53 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
CMake variables
===============
CMAKE_INSTALL_PREFIX
In addition to standard CMake variables, the following can be set to tweak
blahgd's behavior:
DEFAULT_SCGI_PORT - default port to listen on for SCGI requests
DEFAULT_HTML_INDEX_STORIES
- default number of posts per page (index,
archive)
DEFAULT_FEED_INDEX_STORIES
- default number of posts per page (Atom/RSS
feeds)
DEFAULT_COMMENT_MAX_THINK
- default maximum number of seconds of think
time after which a submission is
considered a spam
DEFAULT_COMMENT_MIN_THINK
- default minimum number of seconds of think
time before which a submission is
considered a spam
DEFAULT_DATA_DIR - default path to the data directory
DEFAULT_WEB_DIR - default path to the web directory
VAR_MAX_SCOPES - maximum number of internal scopes
VAR_NAME_MAXLEN - maximum length of a variable name
COND_STACK_DEPTH - template engine function stack size
DEFAULT_TAGCLOUD_MIN_SIZE
- default min font size of tag cloud entries
DEFAULT_TAGCLOUD_MAX_SIZE
- default max font size of tag cloud entries
PREVIEW_SECRET - key used to previewing unpublished posts
Dependencies
============
To build blahgd you must have:
- flex & bison
- libjeffpc
Building and Installing
=======================
$ cmake . -DCMAKE_INSTALL_PREFIX=/prefix
$ make
$ make install
This will install the binaries under the specified prefix.
Running
=======
You can start the blahg daemon (blahgd):
$ ./blahgd
At this point, blahgd is listening on port 2014 for SCGI connections. Now,
you need to configure your webserver to pass requests to blahgd. For example,
for nginx, use a config stanza similar to:
server {
listen 80;
server_name blahg.example.com;
location / {
include scgi_params;
scgi_pass localhost:2014;
}
}
The scgi_params file should include:
scgi_param REQUEST_METHOD $request_method;
scgi_param REQUEST_URI $request_uri;
scgi_param QUERY_STRING $query_string;
scgi_param CONTENT_TYPE $content_type;
scgi_param DOCUMENT_URI $document_uri;
scgi_param DOCUMENT_ROOT $document_root;
scgi_param SCGI 1;
scgi_param SERVER_PROTOCOL $server_protocol;
scgi_param HTTPS $https if_not_empty;
scgi_param REMOTE_ADDR $remote_addr;
scgi_param REMOTE_PORT $remote_port;
scgi_param SERVER_PORT $server_port;
scgi_param SERVER_NAME $server_name;