Ich gehe davon aus, das die benötigten Dateien besorgt wurden und OpenSp installiert ist bzw. auch die Perl - Module installiert sind, die benötigt werden.
Hier im Beispiel wurde lampp unter Linux nach opt/lampp installiert und der Validator
befindet sich in
opt/lampp/htdocs/validator
Der Inhalt aus der gepackten Datei , der sich im Verzeichnis htdocs befindet
wird dann nach opt/lampp/htdocs/validator kopiert.
Alle anderen Unterverzeichnisse der Downloaddatei als Unterverzeichnis nach opt/lampp/htdocs/validator.
Die Verzeichnisstruktur unter opt/lampp/htdocs/validator sieht dann so aus:
config/
dev/
httpd/
images/
misc/
sgml-lib
source/
In das Verzeichnis sgml-lib mussen die DTD - Dateien kopiert werden (enthalten die Definitionen der HTML Versionen und befinden sich im Download 2 von der w3c.org).
Die sich zunächst im Verzeichnis config befindliche Datei validator.conf wird nach opt/lampp/etc/w3c verschoben und dort bearbeitet:
Sie sieht in meinem Beispiel so aus:
Main Configuration File for the W3C Markup Validation Service.
#
# $Id: validator.conf,v 1.2.2.9 2004/05/18 03:41:19 link Exp $
#
# Basic Key/Value pairs, separated by TABs.
# Blank lines and lines beginning with "#" are ignored.
#
# The file:// URLs aren't really URLs; it's just convenient shorthand.
#
# TODO:
# * Document format in /docs instead of here.
# * Ditch this format for a sane one; probably using Config::General.
#
DEBUG 0
#
# Email address of the maintainer of this service.
Maintainer
www-validator@w3.org
#
# The "Home Page" for the service. Make sure this ends with a slash.
Home Page
http://localhost/validator/
#
# Base URL To Error Explanations (doc/errors.html)
Msg FAQ URI
http://localhost/validator/docs/errors.html
#
# Base URL for the Element Reference.
Element Ref URI
http://www.htmlhelp.com/reference/html40/
#
# The SGML Library Path.
SGML Library /opt/lampp/htdocs/validator/sgml-lib
#
# The SGML Parser to use.
SGML Parser /usr/bin/onsgmls
#
# Mapping tables etc...
Element Map file:///opt/lampp/htdocs/validator/config/eref.cfg
FPI to Text file:///opt/lampp/htdocs/validator/config/fpis.cfg
Error to URI file:///opt/lampp/htdocs/validator/config/frag.cfg
File Type file:///opt/lampp/htdocs/validator/config/type.cfg
Doctypes file:///opt/lampp/htdocs/validator/config/doctypes.cfg
Charsets file:///opt/lampp/htdocs/validator/config/charset.cfg
#
# DanC territory...
Tips DB file:///opt/lampp/htdocs/validator/config/tips.cfg
#
# The "templates" for headers, footers...
Header /opt/lampp/htdocs/validator/header.html
Footer /opt/lampp/htdocs/validator/footer.html
#
# Location of Verbose Error Messages...
Verbose Msg /opt/lampp/htdocs/validator/config/verbosemsg.cfg
#
# Allowed Protocols
# - List of (comma separated) protocol schemes to allow.
Allowed Protocols data,http,https
#
# Whether to allow checking resources located at private IP addresses.
Allow Private IPs 1
#
# Whether to allow SOAP support to be enabled (not recommended!).
Enable SOAP 1
------------------------------------------------------------------------
Es sind also Pfade anzupassen und vor allem Allow Private IPs ist auf 1 zu stellen (Voreinstellung ist 0) da ansonsten der Validator lokal nicht funktioniert.
Dann ist die Datei httpd.conf im Verzeichnis opt/lampp/htdocs/validator/httpd/conf zu bearbeiten
Sie sieht bei meiner Installation so aus:
# -*- apache -*-
# Example httpd.conf snippet for W3C Markup Validation Service
# Note that this is not a complete server configuration file, but contains
# only the validator-specific part.
#
# You may use the Include directive for including this in your main httpd.conf.
#
# $Id: httpd.conf,v 1.17.2.5 2004/04/05 20:34:17 ville Exp $
#
# The values below assume that you have the validator files in
# /usr/share/w3c-markup-validator. If not, tune them according to your setup.
# Note that it is not recommended to run the validator under mod_perl
# at the moment.
# This is the directory where you have the validator's "check"
# script as well as its and *.html, *.css etc files.
Alias /validator/ "/opt/lampp/htdocs/validator/"
<Directory /opt/lampp/htdocs/validator>
Options ExecCGI IncludesNOEXEC Indexes MultiViews
AllowOverride None
AddHandler server-parsed .html
AddCharset utf-8 .html
</Directory>
<IfModule mod_perl.c>
# mod_perl 1.2x:
#PerlModule Apache::Registry
#PerlTaintCheck On
#PerlWarn On
# mod_perl 1.99+:
#PerlModule ModPerl::Registry
#PerlSwitches -wT
</IfModule>
# Tell httpd that "check" is a CGI script.
<Location "/validator/check">
SetHandler cgi-script
<IfModule mod_perl.c>
# All mod_perl versions:
#SetHandler perl-script
# mod_perl 1.2x:
#PerlHandler Apache::Registry
#PerlSendHeader On
# mod_perl 1.99+:
#PerlResponseHandler ModPerl::Registry
#PerlOptions +ParseHeaders
</IfModule>
</Location>
Hier sind also nur die Pfade zu korrigieren.
Dann die Datei
opt/lampp/etc/httpd.conf öffnen und am Ende folgende Zeilen anhängen:
#validator
Include /opt/lampp/htdocs/validator/httpd/conf/httpd.conf
--------------------------------------------------------------------------------
Nun Apache neu starten und fertig ist die Installation.