httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nerius Landys <nlan...@gmail.com>
Subject Re: [users@httpd] configure apache to parse php
Date Sun, 15 Aug 2010 18:01:43 GMT
> According to the php manual, apache should be configured to parse php, e.g.:
>
> <FilesMatch \.php$>
>    SetHandler application/x-httpd-php
> </FilesMatch
>
> Apparently this should be part of the addtype directive. I don't
> understand which file I am to edit and add the code shown above. Can
> somebody help please?

In my opinion the preferred way to build PHP is with APACHE "Build
Apache module" set to on.

If you installed Apache from ports, you want to edit for example
/usr/local/etc/apache22/httpd.conf .
Relevant lines in httpd.conf that configure PHP are, if you are
configuring the Apache module.


LoadModule php5_module        libexec/apache22/libphp5.so

    DirectoryIndex index.html index.php
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    php_value include_path .:/usr/local/share/pear:/some/dir/to/php_includes
    php_value display_errors On

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


Mime
View raw message