#                                                                -*- apache -*-
# Yosemite (10.10) Apache 2.4 configuration for Validator S.A.C. installed in /Applications

# Load required non-default modules

LoadModule cgi_module libexec/apache2/mod_cgi.so
LoadModule include_module libexec/apache2/mod_include.so

# First, tell httpd that check_wrapper.sh and sendfeedback_wrapper.sh are CGI scripts.

ScriptAlias      /w3c-validator/check   '/Applications/Validator-SAC.app/Contents/Resources/validator/httpd/cgi-bin/check_wrapper.sh'
ScriptAliasMatch /w3c-validator/feedback(\.html)? '/Applications/Validator-SAC.app/Contents/Resources/validator/httpd/cgi-bin/sendfeedback_wrapper.sh'

<Directory "/Applications/Validator-SAC.app/Contents/Resources/validator/httpd/cgi-bin">
  AllowOverride None
  Options None
  Require all granted
</Directory>

# This is the directory where you have the validator's *.html, *.css etc files.

Alias /w3c-validator/   '/Applications/Validator-SAC.app/Contents/Resources/validator/htdocs/'

<Directory '/Applications/Validator-SAC.app/Contents/Resources/validator/htdocs/'>
  Options               IncludesNOEXEC Indexes MultiViews
  AllowOverride         None
  Require all granted
  SSILegacyExprParser on
  AddHandler            server-parsed .html
  AddCharset            utf-8         .html
</Directory>

<IfModule mod_headers.c>
<Directory '/Applications/Validator-SAC.app/Contents/Resources/validator/htdocs/images'>
  Header set            Cache-Control "max-age=604800"
</Directory>
</IfModule>

# Advertise the service on Bonjour/Rendevous
# mod_bonjour is available from Homebrew. Install with:
#    brew install homebrew/apache/mod_bonjour
# And load with something like:
#    LoadModule bonjour_module /usr/local/Cellar/mod_bonjour/2.3/libexec/mod_bonjour.so
<IfModule bonjour_module>
  RegisterResource "W3C Validator S.A.C." /w3c-validator/
</IfModule>
