Quantcast
Channel: Manfaat Sehat
Viewing all articles
Browse latest Browse all 61

Installing the W3C and HTML5 Validator: Debian 7 x64

$
0
0
To set up the W3 Committee Validator:
#  aptitude update

#  aptitude install w3c-markup-validator libwebservice-validator-html-w3c-perl libtest-html-w3c-perl libxml-xpath-perl w3-dtd-mathml libhtml-format-perl libxml2-utils tidy

#  vim /etc/w3c/validator.conf

Edit the line to read:
Allow Private IPs = yes

Set up the Apache file:

#  vim /etc/apache2/sites-avalable/validator.domain.com

with these contents (which need the correct IP and ServerName):
 <VirtualHost 101.202.102.201:80>
        ServerName validator.domain.com
        ServerAdmin webmaster@domain.com
        # DocumentRoot /vweb/validator.domain.com/docs/public
        php_value log_errors On
        php_value display_errors Off

        ServerSignature Off

# Prevent access to .svn folders
RewriteEngine On
RedirectMatch 404 /\\.svn(/.*|$)

Include /etc/w3c/httpd.conf

</VirtualHost>



Enable that apache2 config: 

#  a2ensite validator.domain.com

#  apache2ctl -k graceful




Now set up DNS and visit your site at:

https://validator.domain.com/w3c-validator/



To set up the HTML5 validator part:

#  aptitude install openjdk-6-jdk openjdk-6-jre-headless mercurial subversion python ant

#  mkdir /usr/local/html5-validator

#  cd /usr/local/html5-validator

#  export JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64/

#  hg clone https://bitbucket.org/validator/build build

#  python build/build.py all

#  python build/build.py all



Set up the HTML5 service:

#  vim /etc/init/html5-validator.conf

put in:
description "Validator.nu HTML5 Validator"

start on runlevel [234]
stop on runlevel [0156]

chdir /usr/local/html5-validator
exec python build/build.py --control-port=8889 run
respawn
Make that executable and set it up to start at boot (runlevel 2):

# chmod u+x /etc/init/html5-validator.conf

# ln -s /etc/init/html5-validator.conf /etc/rc2.d/S99-html5-validator


# /etc/rc2.d/S99-html5-validator start


Edit
# vim /etc/w3c/validator.conf

and uncomment the line
HTML5 = http://localhost:8888/html5/HTML
Restart Apache2
#  apache2ctl -k graceful

and try the HTML5 validator now.



Much thanks to SimplyTestable, Validator.NU, and the W3Committee.



Viewing all articles
Browse latest Browse all 61

Trending Articles