December | 2006 | arfore dot com

When you setup a website to be managed by Contribute, the name that shows up in the client for the connection description is generated from the text of the title tag of the index page of the website.

For setups where you are only managing a single site, this may not matter, but if you have a system where you use a development server and a production server, you may want the connection string to depict which server the user is editing and publishing to.

In order to change the text of the description you have to alter some text in a few files on the CPS management server.

In the installation directory of CPS, there is a database directory. This is the location of the files that are specific to the individual websites that are being managed.

The files in each site being managed are in a directory that is “numbered”, the number relates to the numerical order in which they were set up. If you remove a particular site, the numbers are not reused.

In each of the site directories there is a file named:

This file, in XML format, contains a

tag. The attribute

is the text that shows up in the Contribute client on the start page.

Once this is updated and a user logs into the Contribute server, the client connections are updated.

While this may be enough on it’s own to effect the change desired, the original name is still referenced in the cthub file for each individual site. I changed the name in both locations for completeness.

AWStats is a great open-source stats analyzation program.

In the process of setting up a replacement webserver at VSU I was investigating the replacement of analog, another nice open-source stats program.

The problem with analog is that the people requesting stats were confused by the technical output. These people aren’t computer folks, they just want to know who or what or when the pages they maintain are being visited.

The default setup of AWStats is fairly easy to accomplish, but if you want to generate separated stats on individual directories off the web root, then it takes a little know how.

In the configuration file for AWStats, there is a section that allows you to limit the processing to a given set of files. Interestingly enough the variable controlling this is called OnlyFiles. The relevant section of the default configuration file is:

# Include in stats, only accesses to URLs that match one of following entries. # For example, if you want AWStats to filter access to keep only stats that # match a particular string, like a particular directory, you can add this # directory name in this parameter. # The opposite parameter of “OnlyFiles” is “SkipFiles”. # Note: Use space between each value. This parameter is or not case sensitive # depending on URLNotCaseSensitive parameter. # Note: You can use regular expression values writing value with REGEX[value]. # Change : Effective for new updates only # Example: “REGEX[marketing_directory] REGEX[office\/.*\.(csv|sxw)$]” # Default: “” #

OnlyFiles=””

What you have to do is to change the value to the regular expression that represents you desired subset. For instance if you wanted to limit the stats generation to the directory foobarbaz then the particular string would be:

OnlyFiles=”REGEX[^\/foobarbaz]”

In order to make this work without keeping you from obtaining stats for the entire site as well you will need to duplicate the master configuration file for awstats and alter the entry as stated above. Make sure the provide a unique name for the config file, such as:

awstats.foobarbaz.conf

At VSU, we are implementing the Adobe (formerly Macromedia) Contribute Publishing Server and CMS.

This is a two-piece system that involves a client-side component (Contribute) and a server-side component (CPS).

We are running this on a Linux server, so we needed an easy way to start the service up should a system reboot occur.

Now Macromedia included a very simple shell script that made a call the included OEM Jrun binary to start the server. The only problem is that it had no facility to plugin to the chkconfig tool that can be used to manage services in the various runlevels.

So I wrote a very simple one:

#!/bin/bash # # CPS Startup script for the Macromedia Contribute Publishing Server # # chkconfig: 2345 80 20 # description: The CPS is the backend to manage the Macromedia Contribute CMS. # processname: jrun -nohup -start contribute-wps

# pidfile: none noticed

# Source function library.
. /etc/rc.d/init.d/functions jrun=${JRUN-/usr/Macromedia_CPS/jrun4/bin/jrun} prog=CPS lockfile=${LOCKFILE-/var/lock/subsys/macromedia_cps}

RETVAL=0

start() { echo -n $”Starting $prog: ” $jrun -nohup -start contribute-wps RETVAL=$? echo [ $RETVAL = 0 ] && touch ${lockfile} return $RETVAL } stop() { echo -n $”Stopping $prog: ” $jrun -stop contribute-wps RETVAL=$? echo [ $RETVAL = 0 ] && rm -f ${lockfile}

}

# See how we were called. case “$1″ in start) start ;; stop) stop ;; status) $jrun status ;; restart) stop start ;; *) echo $”Usage: $prog {start|stop|restart|status|}” exit 1

esac

Note that the lockfile referenced was an invention on my part, since the standard startup of jrun included with CPS doesn’t appear to create either a standard lockfile or pidfile.

After creating the file in /etc/init.d directory, you will need to run the following command:

This will add your new script to the service list maintained for use with chkconfig. At this point all the standard chkconfig commands can be used to manage this.

For more on chkconfig check out the chkconfig online man page at LinuxCommand .

In the process of troubleshooting the LDAP user problems I was experiencing I found that by default the logging of info and debug messages is turned off by default for the OEM jrun install that is part of Contribute Publishing Server 3.11.

In order to enable these logging levels you have to edit the sevrer configuration xml file. This file should be located in the configuration directory of your jrun4 server’s WEB-INF folder.

The name of the file is:

Open this file in your favorite editor and look for the following section:

<logger_settings> <out> <file>/usr/Macromedia_CPS/logs/out.log</file> </out> <err> <file>/usr/Macromedia_CPS/logs/err.log</file> </err> <show> <debug>true</debug> <info>true</info> <error>true</error> </show>

</logger_settings>

By default the logger is only set to show error messages. This section also shows the location of the error logs and the output logs.

Note, that enabling this you will get larger log files, since this will log all connections to the LDAP server by the Contribute client(s) that you have installed. You may find it necessary to open the admin console and set a max log file size to control this.

One of the annoyances I have found with the Contribute Client is that in the Administration interface section, when adding a user, the menu of roles is not sorted for you. The list that appears when you reassign a user or when you create a new role, is sorted for you.

Each time that a new role is added, the client updates the hub file, adding the new role to the end of the list.

In investigating this I found that the hub file is just an XML file. This file is stored in the root _mm folder of the website that you are managing. Note that this file is connection specific, so if you are managing multiple websites, the location of this control file will vary. And if you are managing a large deployment by having multiple sites with a single directory structure, you will have a different _mm folder and hub file for each site, even though they are physically on the same server they are treated differently by the logic of the software.

%d bloggers like this: