Author : Luc Bonameau (Luc.Bonameau@inrialpes.fr) |
Copyright © 1999 W3C (MIT, INRIA, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply.
The required programs to install this feature are :
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/
# location of templates's files
# relative location of css's files
# file used for login/directory correspondence
# Stylesheet for the form
# XML file
# Intelligent publish
# Location of the file amaya.gif used for the form
cp *.xml $temp_dir
mkdir /home/httpd/templates
cp /templates/* /home/httpd/templates/
Alias /templates/ /home/httpd/templates/
This feature allows the users to publish on your server whithout having to know their publication directory.
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
cp templates.conf /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>
The form proposing templates and stylesheets will automatically be updated and displayed the next time you use the template fonctionality.
The Amaya client browser/editor (version >= 2.1) must be told which server is providing templates.
Open the templates preferences menu (Preferences -> Templates) and fill in the text entry :
http://cgi.w3.org