httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Saunders <>
Subject [users@httpd] Apache2 and file extensions
Date Wed, 25 Feb 2004 15:45:30 GMT

I'm trying to configure my Apache2 server to run Mason on all files with 
a .mhtml extension but use the default handler for all other files. I'm 
also trying to use the DirectoryIndex directive to specify index.mhtml 
and index.html as files to look for in that order. When I request the 
index.mhtml explicitly, I get errors as described below. The index.html 
file loads okay. Has anyone experienced Mason and Ap2?

In my perl.conf file, I've got the following configuration:

DirectoryIndex index.mhtml index.html

<FilesMatch "\.mhtml$">
   SetHandler	perl-script
   PerlResponseHandler	HTML::Mason::ApacheHandler2

The .html files are loaded and reproduced correctly, but I can't seem to 
  get the .mhtml files to be processed. The required Mason modules are 
loaded but all I get in the error log is the following:

"[warn] Request, /index.mhtml, is of type, - skipping"

which seems to imply that Apache doesn't know what the .mhtml is, or, if 
I include the line:

AddType perl-script .mhtml

to my perl.conf file and restart, I get:

"[warn] Request, /index.mhtml, is of type, perl-script - skipping"

I realise that this is probably a simple mis-configuration, but whatever 
type I configure .mhtml as, it never gets parsed correctly and I get a 
warning in the format above (or badly formatted header because of the 
mason syntax that's included in the index.mhtml file).

Any ideas?



This email has been scanned by the MessageLabs Email Security System.
For more information please visit 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message