Five By Five
2012-09-01 06:54:58 UTC
My Apache manual is located in "D:/WebServer/ApacheManual"
Two relevant items in httpd.conf are:
1. Alias /manual "D:/ApacheConfLogs/manual"
2. Include D:/ApacheConfLogs/httpd/config/extra/httpd-manual.conf
There are edits in the httpd-manual.conf, so I have the entire listing below.
With this configuration, I get a "500 Internal Server Error"
The error log gives the following entry:
Syntax error in type map, no ':' in D:/ApacheConfLogs/manual/index.html
for header <?xml version="1.0" encoding="iso-8859-1"?>\r\n
In googling for solutions, one approach was to change the line
"SetHandler type-map" to "SetHandler default-handler". This enabled getting
the index page to the Apache manual. But when a link is clicked, the page
wanted is not delivered. This is because the link goes to an HTML page which
contains information for getting XML content that is to be rendered, and the
HTML page content is structured for Apache's Negotation module.
========= start httpd-manual.conf ==============
AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|pt-br|ru|tr))?(/.*)?$
"D:/ApacheConfLogs/manual$1"
<Directory "D:/ApacheConfLogs/manual">
Options Indexes
AllowOverride None
Order allow,deny
Allow from all
<Files *.html>
SetHandler type-map
</Files>
# .tr is text/troff in mime.types!
<Files *.html.tr.utf8>
ForceType text/html
</Files>
SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|pt-br|ru|tr)/ prefer-
language=$1
RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|pt-br|ru|tr)){2,}(/.*)?
$ /manual/$1$2
LanguagePriority en de es fr ja ko pt-br ru tr
ForceLanguagePriority Prefer Fallback
</Directory>
========= end httpd-manual.conf ==============
====================
More Info Than Necessary (included to answer other questions sometimes put to
me):
* I keep everything related to user-modifiable/customizable web server
configuration, operation, etc under the "D:/WebServer/" tree, including PHP
stuff. Apache error/access/install logs. This is so that this stuff is
preserved if the OS logical drive has a problem requiring full restore from a
backup and avoiding loss of user-customizable options and other instance-
related (meta)data.
* I always put on a logical drive separate from the OS drive, namely drive
"D:", any material that is to be served by a web server using 'http'
protocol. Call it a false sense of security.
* OS: Microsoft Win7 64-bit SP1
* Machine: ASUS G74SX, 8 GB RAM, Intel Core i7, NVIDIA GeForce GTX 540M
* Server: Apache 2.2 extended with PHP 5.2, MySQL 5.5
* Security: NAV 19.8 continuous monitoring +
manual scans Malwarebytes (free ed), HijackThis analysis
sfc /scannow ok (1 defect in Win7 installation bundled by ASUS)
Two relevant items in httpd.conf are:
1. Alias /manual "D:/ApacheConfLogs/manual"
2. Include D:/ApacheConfLogs/httpd/config/extra/httpd-manual.conf
There are edits in the httpd-manual.conf, so I have the entire listing below.
With this configuration, I get a "500 Internal Server Error"
The error log gives the following entry:
Syntax error in type map, no ':' in D:/ApacheConfLogs/manual/index.html
for header <?xml version="1.0" encoding="iso-8859-1"?>\r\n
In googling for solutions, one approach was to change the line
"SetHandler type-map" to "SetHandler default-handler". This enabled getting
the index page to the Apache manual. But when a link is clicked, the page
wanted is not delivered. This is because the link goes to an HTML page which
contains information for getting XML content that is to be rendered, and the
HTML page content is structured for Apache's Negotation module.
========= start httpd-manual.conf ==============
AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|pt-br|ru|tr))?(/.*)?$
"D:/ApacheConfLogs/manual$1"
<Directory "D:/ApacheConfLogs/manual">
Options Indexes
AllowOverride None
Order allow,deny
Allow from all
<Files *.html>
SetHandler type-map
</Files>
# .tr is text/troff in mime.types!
<Files *.html.tr.utf8>
ForceType text/html
</Files>
SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|pt-br|ru|tr)/ prefer-
language=$1
RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|pt-br|ru|tr)){2,}(/.*)?
$ /manual/$1$2
LanguagePriority en de es fr ja ko pt-br ru tr
ForceLanguagePriority Prefer Fallback
</Directory>
========= end httpd-manual.conf ==============
====================
More Info Than Necessary (included to answer other questions sometimes put to
me):
* I keep everything related to user-modifiable/customizable web server
configuration, operation, etc under the "D:/WebServer/" tree, including PHP
stuff. Apache error/access/install logs. This is so that this stuff is
preserved if the OS logical drive has a problem requiring full restore from a
backup and avoiding loss of user-customizable options and other instance-
related (meta)data.
* I always put on a logical drive separate from the OS drive, namely drive
"D:", any material that is to be served by a web server using 'http'
protocol. Call it a false sense of security.
* OS: Microsoft Win7 64-bit SP1
* Machine: ASUS G74SX, 8 GB RAM, Intel Core i7, NVIDIA GeForce GTX 540M
* Server: Apache 2.2 extended with PHP 5.2, MySQL 5.5
* Security: NAV 19.8 continuous monitoring +
manual scans Malwarebytes (free ed), HijackThis analysis
sfc /scannow ok (1 defect in Win7 installation bundled by ASUS)