The programs needed to install this4 feature are :
All files needed for this installation are available in the compressed file templates.tgz downloadable here.
An installation script (./install) is also available.
For a manual install, follow the steps below:
tar zxvf XML-Parser-2.23.tar.gz
perl Makefile.PL && make && make install
cp Scripts/*.pl /home/http/cgi-bin/
cp Scripts *.pm /home/http/cgi-bin/
cp templates.xml /etc/httpd/conf
mkdir /home/httpd/templates
cp /templates/* /home/httpd/templates/
<templates dir="/home/httpd/templates/">
Do not forget the slash after the URL
Alias /templates/ /home/httpd/templates/
In order to allow direct publication, Apache server must be configured to accept the PUT method.
Here are the following steps to perform this :
gcc -o /home/httpd/cgi-bin/put PUT/put.c
Script PUT /home/httpd/cgi-bin/put
For more information about the put feature, follow this link
Publishing Pages with PUT - http://www.apacheweek.com/features/put
The next step consist in allowing the server to manage publication rights.
Include /etc/httpd/conf/templates.conf
touch /etc/httpd/conf/templates.conf
<FilesMatch sendtemp.pl>
AuthName templates
AuthType Basic
AuthUserFile /etc/httpd/conf/passwd
AuthGroupFile /etc/httpd/conf/groups
Options ExecCGI
order allow,deny allow from all
require group public
</FilesMatch>
To add a user allowed to use direct publication on the server, follow the steps below :
htpasswd password_file user_name
i.e : htpasswd passwd dupont
By default, the password file is /etc/http/conf/passwd. If the password file does not exist yet, add the prefix -c to the previous command :
i.e : htpasswd -c passwd dupont
This file realize the correspondence between the user login and his server publication directory. So add the line like below
dupont:/Jean_Dupont/
"dupont" is the login and "Jean_Dupont" is the relative address of the publication directory. The absolute address is /home/httpd/html/Jean_Dupont.
mkdir /home/httpd/html/Jean_Dupont
<Directory /home/httpd/html/Jean_Dupont>
AuthName templates
AuthType Basic
AuthUserFile /etc/httpd/conf/passwd
AuthGroupFile /etc/httpd/conf/groups
Options Includes FollowSymLinks
AllowOverride None
order allow,deny allow from all
<Limit PUT>
require user dupont
</Limit>
</Directory>
The authentification name AuthName must be the same as the one in the <FilesMatch sendtemp.pl> section previously typed.
To add templates and CSS, copy the associated files in the templates directory (/home/httpd/templates/ par défaut)and modify the file templates.xml as below :
<template file="filename.html">
<name>template_name</name>
<description> A description sentence of the template </description>
</template>
<stylesheet file="filename.css">
<name>Stylesheet_name</name>
<description> A description sentence of the stylesheet </description>
</stylesheet>
New templates and stylesheets will automatically be recognized and displayed the next time you use the template fonctionality.
The Amaya client browser/editor (version >= 2.1) must be told which server provides templates.
Insert in the configuration file thot.rc the following line :
URL_TEMPLATE=http://server_name/cgi-bin/createform.pl