-
Notifications
You must be signed in to change notification settings - Fork 0
blahgd (git mirror)
License
jeffpc/blahgd
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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;