About ClariNews ClariNet Info Support Fun Stuff & Jokes Fun Stuff & Jokes ClariNet Home
ClariNet

If you are seeing this message use the text links at the bottom of this page for navagation

Read ClariNews
Find ClariNet Service
Find ClariNet Service
Find ClariNet Service

Support ClariCGI Auto-configuration form

ClariCGI Auto-configuration form

This form explains what you need to do to configure ClariCGI and will actually build a configuration file for you. Enter the values you need on this form then click on the form-building button below. This will return to you a plain text file that you can save from your web browser as the configuration file.

You will also probably want to save this form page after you have filled it out. Then, when you want to change your configuration, you can go back to your saved form page, which has the inputs you decided for your system, and use it again to generate a new configuration file.

You can of course also just edit the distribution configuration file that comes with system. That's not very hard to do either and is somewhat simpler if you are used to that sort of scheme.


Access Control (Required)

There are two places you can do access control. Generally the best place to do it may be in the configuration files for your web server, where you can allow access to the CGI only to users at certain sites (such as your own) or users with a userid and password. However, as ClariCGi supports open access to predefined queries, you may wish to make it open and do access checks here. Or you may wish to do a combination, or have two copies of the CGI configured with different config files. If you are a ClariNet subscriber, it is required that you make sure that users not covered by your site licence are not given access to ClariNet articles via ClariCGI. In a standard configuration, we suggest you let the web server do the access control, and define an Allow pattern below of ".".

Sites allowed access to the program are defined here. Deny is done first, then allow. You may either provide a regular expression to match a domain name -- if your web server does reverse domain lookups -- or you may use a special pattern to specify an IP address range. Note that on some systems reverse DNS lookups are not secure -- your http server must double verify gethostbyaddr lookups with a check to see if gethostbyname matches, or this check can be easily spoofed.

To do an IP address range use the form, "ip:net-octets subnet-bits" eg: ip:192.54.253 8 does the ClariNet class C network.

We recommend that you just define a pattern for your site's numeric address here, unless you are sure you have a spoof-proof gethostbyaddr.

We have also included ClariNet's network in here. We find this useful, it lets us check on the status of your site for you, so please leave it in unless there is a serious problem.

These are regular expressions of sites to allow access to. The default is to deny access.

Here you can list sites to deny access to. The default is to deny, so you usually need only list sub-sites or subnets within the networks you allowed above.

Newsgroups Permitted (Optional)

You may or may not wish to allow access to all newsgroups to users who are allowed to use ClariCGI. You may only wish it used on ClariNet articles, or you may wish to allow others. Below, list the newsgroups users may access with ClariCGI by providing strings, one of which must match the start of any newsgroup fetched.

If you list no newsgroups, all will be permitted. If you do this, or list "clari" in this field, you must not allow users not covered by your site licence to access ClariNet groups. Do that with the access control fields above, or with security on your web server. These are just prefix strings, not regular expressions.

Local News System Configuaration (Defaults usually OK)

Here you define the locations of things on your systems. Common defaults are defined in the system so you usually don't have to fill in anything if the default is right for your system. (The default is not specified in the text boxes, enter nothing if you want the default.)

USENET News spool directory (Default: /usr/spool/news)
USENET History File (Default: /usr/lib/news/history)
USENET Active File (Default: /usr/lib/news/active)
USENET Overview directory, if overview files are not kept in the news spool directory (Moving them increases efficiency). Default means overviews are kept in spool directory, but a common value is /usr/spool/news/over.view or just over.view, since all paths in ClariCGI are relative to the root of the news spool.

Local Destinations (Optional)

Provide the URL of your local home page, or any other page you want users to be directed to if they get certain errors from ClariCGI, such as permission denied. If, for example, you put up ClariCGI for your users but want outsiders who try to run it to get a link to a page promoting your site and why they should want to be at it, do so here.

Local Info Page:

Default is ClariNet.

Picture Cache (Recommended)

In order for the system to handle photos efficiently, it likes to cache them in a cache directory so later users (and indeed that user when inlining the image) can just pull the photo from the cache instead of doing MIME decoding. You must create a directory that can be seen by the web server, and make it writable by the user that runs CGI programs. It is not required that you enable the cache, it's just more efficient. You need to name the real directory, and the URL of the directory, as seen from the root of the web server.

Picture cache directory:
Picture cache URL:

You can put the Cache directory outside the tree if you put a symlink to it inside the tree of course.

By default, ClariCGI only caches small pictures from ClariNet stories, not large ones. Large ones actually benefit much more from cacheing, but they are fetched far less often and take more space. However, if you would like to cache them it will give faster response on them to users.

Cache Large Photos
Check this if you want to manually clean the image cache directory, instead of having ClariCGI do it. It's slightly more efficient for you to do it.

Other Special Directories

ClariCGI supports some other special directories, for storing personal newspaper profiles and special templates. See the detailed config information for more details on those.

File Open Security (Important)

Here we define patterns that all filenames opened by safe_fopen must match. This way, you can be sure that unless the program is compromised completely, there is no way it is going to access files outside the trees it is supposed to be working in. This isn't total security, because if somebody finds a bug in your CGI which lets them execute arbitrary code, they can do their own open calls, but this assures you that bugs less than that won't let people read or write where you don't want.

First you list the directories you will allow access to. We will automatically add the image cache directory and the personal newspapers directory, as well as the news spool directory, so in most cases you don't need to list any entries here. We will also add the overview dir if provided. These are just prefixes, not regular expressions.

File May Start

File Not Start

Then list prefixes for files that are NOT allowed, unless they matched above. Usually you do "/" to forbid all root attempts not approved above. Local paths are thus allowed. In this CGI, chdir(root of news spool) is done.

File Must Have

Here you can list patterns that must exist in any file that can be opened. For this application, you usually don't need to provide any. (If you don't provide any, all file names pass this particular test.)

File Not Have

Finally list strings which may not be put in the filename. "../" is the obvious choice, needed to stop users from attempting to go to other directories they aren't supposed to. This is a string, which is searched for in the filename but it is not a regular expression.

Group, Article and Listing Templates (Recommended)

Using ClariCGI's internal language, you can define templates for how it will display articles, newsgroup article menu pages, the entries in article menus and more. You can have general templates, or a template for each group and hierarchy. Generally, defining such templates requires more sophisticated skill, however, we provide some for you for ClariNet groups.

Since the check for the presence of templates at each level of the group hierarchy for each article takes some time, you must enable it if you wish it.

You can also store article templates in variables defined in the header or in the DBM database by defining names equal to the pathname of the tempalte relative to the root of the news spool directory. It checks for a config file header variable first (which will be in RAM, and is most efficient, but only suitable if you only want one or two templates) and the DBM database second.

Look for per-group Article Templates in variables/DBM

Look for per-group Article Templates.

If both the above are checked, it tries the variables/DBM first all the way up the hierarchy, and only if that fails does it try the actual news spools.

Templates for headline layouts of groups are always searched for. First variables, then DBM and then the news spools are checked.

You can define templates for articles, headline lists and lists of newsgroups in the configuration file as well, however, scripting them in a web form is not the best way to enter them. Edit the claricgi.conf file to add templates as you need them.

Simple Configuration Parameters (Optional)

The standard templates for articles will insert a string at the top to indicate your sponsorship of the ClariNews or USENET. If you wish such a string, enter it here. A suitable string might be, "(courtesy XYZ Inc.)" with a URL or an inline of a graphic with your logo. Use   to start this with a space, leading spaces are removed.

Provider Tag:

The ClariNet Logo is inserted on all pages. We expect to you leave this on our stories, and the default location for it is /Gifs/narrow.gif on the same web server that has the CGI. You can get a copy of it from our web server, or it comes with the distribution. If you wish to locate Look for per-group Article Templates.

Your local gateway page

You may have prepared a local page with a gateway to the ClariNews. If so, you can make that appear on the default menu when ClariCGI is called with no options if you like. Just enter the HTML you would like for a link to that page here.

Local Page Link:

For example, <a href=/claritree.html>The Local ClariNews Gateway Page</A>

Now build your config file

Click on the submit button and this form will build you a suitable claricgi.conf file. Simply save it from your web browser and install it on your server.

------------------------------------------------------------------
About Clarinews | Clarinet Info | Support | Info for ISPs | Fun Stuff | Home