Loading ...
Sorry, an error occurred while loading the content.
 

Apache2 and file extensions

Expand Messages
  • Rob Saunders
    Hi, 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
    Message 1 of 1 , Feb 25, 2004
      Hi,

      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
      </FilesMatch>


      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've tried also cgi-script, text/html, ... but to no avail, 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?

      TIA

      Rob

      ______________________________________________________________________
      This email has been scanned by the MessageLabs Email Security System.
      For more information please visit http://www.messagelabs.com/email
      ______________________________________________________________________

      ---------------------------------------------------------------------
      The official User-To-User support forum of the Apache HTTP Server Project.
      See <URL:http://httpd.apache.org/userslist.html> for more info.
      To unsubscribe, e-mail: users-unsubscribe@...
      " from the digest: users-digest-unsubscribe@...
      For additional commands, e-mail: users-help@...



      ______________________________________________________________________
      This email has been scanned by the MessageLabs Email Security System.
      For more information please visit http://www.messagelabs.com/email
      ______________________________________________________________________

      --
      Report problems: http://perl.apache.org/bugs/
      Mail list info: http://perl.apache.org/maillist/modperl.html
      List etiquette: http://perl.apache.org/maillist/email-etiquette.html
    Your message has been successfully submitted and would be delivered to recipients shortly.