How to install/use w3c-markup-validator on 12.04?

Asked by Michael Mc Donnell

I've installed the w3c-markup-validator package via:

$ sudo apt-get install w3c-markup-validator

Now what? How do I access it?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu w3c-markup-validator Edit question
Assignee:
No assignee Edit question
Solved by:
Michael Mc Donnell
Solved:
Last query:
Last reply:
Revision history for this message
arochester (arochester) said :
#1

Try opening a Terminal and inputting: w3c-markup-validator

Revision history for this message
Michael Mc Donnell (michael-mcdonnell) said :
#2

I got it to work. I used the instructions on http://linux.m2osw.com/xhtml_validator and changed them slightly.

1. Create a new site in the apache configuration:

$ sudo gedit /etc/apache2/sites-available/validator

2. Fill in the following data in the opened file:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /usr/share/w3c-markup-validator/html/
    ServerName validator
    ScriptAlias /check /usr/lib/cgi-bin/w3c-markup-validator/check
    ErrorLog /var/log/apache2/validator-error_log
    CustomLog /var/log/apache2/validator-access_log combined
</VirtualHost>

3. Add validator to hosts file by opening it:

$ sudo gedit /etc/hosts

Then add the line:

127.0.0.1 validator

5. Enable your site:

$ sudo a2ensite validator

6. Reload apache

sudo service apache2 reload

Revision history for this message
Michael Mc Donnell (michael-mcdonnell) said :
#3

Forgot the last step :-)

7. Go to http://validator/

Revision history for this message
Michael Mc Donnell (michael-mcdonnell) said :
#4

I forgot some more steps.

8. Open /etc/w3c/validator.conf:

$ sudo gedit /etc/w3c/validator.conf

9. Change the line:

Allow Private IPs = no

to

Allow Private IPs = yes

10. Add the external html5 validator, by adding the line

HTML5 = http://html5.validator.nu/

in the External section, e.g. :

<External>
## Enable checking documents via external services.
## The example config below assumes that you have installed the validator.nu
## engine on the same machine as the markup validator.
## See http://about.validator.nu/ for installation instructions.
#HTML5 = http://localhost:8888/html5/
#CompoundXML = http://localhost:8888/
HTML5 = http://html5.validator.nu/
</External>

11. Save and close the file.