Re: directoryindexing or what?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On October 18, 2011 14:35 , Frank Gingras <francois.gingras@xxxxxxxxx> wrote:
You should not use AddType for this. Instead, use:

<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>

See http://wiki.apache.org/httpd/PHPDownload and
http://www.php.net/manual/en/install.unix.apache2.php

Can you elaborate on that? I use AddType because avoiding the regular expression match done by FilesMatch is presumably more efficient. But is there a problem with this? If so, what is it?

I checked both of the web pages you link to above (including all of the comments on the second one), but while the AddType method is not talked about on either of them, it's not warned about, either. The PHPDownload page says "check the value of the Content-Type: http header. If it's application/x-httpd-php, you'll need to remove all erroneous references to that value as a mime type in your config." When I use AddType in my configuration, the Content-Type header for a PHP page has the value "text/html; charset=utf-8"; hence I am assuming that my use of AddType is not an erroneous use.

Any insights you can provide would be appreciated.

--
  Mark Montague
  mark@xxxxxxxxxxx


---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux