ports/www/validator/files/patch-httpd_conf_httpd.conf
Bartek Rutkowski 5f504a098d www/validator: various improvements
- Provide patched validator.conf.sample from original sources
- Remove httpd.conf sample file from pkg-message
- Use WWWDIR variable

PR:		202733
Submitted by:	Naram Qashat <cyberbotx@cyberbotx.com> (maintainer)
2015-11-08 11:33:45 +00:00

55 lines
2.1 KiB
Text

--- httpd/conf/httpd.conf.orig 2012-03-12 15:03:14 UTC
+++ httpd/conf/httpd.conf
@@ -6,7 +6,7 @@
# You can use the Include directive for including this in your main httpd.conf.
#
# The values below assume that you have the validator files in
-# /usr/local/validator. If not, tune them according to your setup.
+# %%WWWDIR%%. If not, tune them according to your setup.
#
# To run the validator without mod_perl 2.x even if it is loaded, comment
# out the "IfDefine MODPERL2" sections below.
@@ -31,14 +31,16 @@ RewriteRule ^/+w3c-validator/+check$ \
# Tell httpd that check and sendfeedback.pl are CGI scripts.
-Alias /w3c-validator/check /usr/local/validator/cgi-bin/check
+Alias /w3c-validator/check \
+ %%WWWDIR%%/httpd/cgi-bin/check
AliasMatch ^/+w3c-validator/+feedback(\.html)?$ \
- /usr/local/validator/cgi-bin/sendfeedback.pl
+ %%WWWDIR%%/httpd/cgi-bin/sendfeedback.pl
<IfDefine MODPERL2>
# Note: this block affects the whole server, not just the validator.
PerlSwitches -T
-PerlPostConfigRequire /usr/local/validator/httpd/mod_perl/startup.pl
+PerlPostConfigRequire \
+ %%WWWDIR%%/httpd/mod_perl/startup.pl
</IfDefine>
<LocationMatch "^/+w3c-validator/+(check|feedback(\.html)?)$">
@@ -60,8 +62,9 @@ PerlPostConfigRequire /usr/local/validat
# This is the directory where you have the validator's *.html, *.css etc files.
-Alias /w3c-validator/ /usr/local/validator/htdocs/
-<Directory /usr/local/validator/htdocs/>
+Alias /w3c-validator/ \
+ %%WWWDIR%%/htdocs/
+<Directory %%WWWDIR%%/htdocs/>
Options IncludesNOEXEC Indexes MultiViews
AllowOverride None
AddHandler server-parsed .html
@@ -73,7 +76,10 @@ Alias /w3c-validator/ /usr/local/valid
<Files *.css.gz>
ForceType text/css
</Files>
-
+# If you would like to move the location of validator.conf, set the following,
+# making sure to change the path if you don't use this path.
+# SetEnv W3C_VALIDATOR_CFG \
+# %%WWWDIR%%/htdocs/config/validator.conf
<IfModule mod_rewrite.c>
Options +SymLinksIfOwnerMatch
RewriteBase /w3c-validator/