FreeBSD running PHP on Apache24

Trond Endrestøl Trond.Endrestol at fagskolen.gjovik.no
Fri Jan 13 08:07:08 UTC 2017


On Thu, 12 Jan 2017 10:08-0500, James B. Byrne via freebsd-questions wrote:

> 
> On Wed, January 11, 2017 17:11, James B. Byrne wrote:
> > I cannot seem to discover where one obtains the php5 module for
> > apache24.  On my CentOS6.8 boxes running Apache2.4.9 I do this in
> > php.conf
> >
> > LoadModule php5_module modules/libphp5.so
> >
> > But I cannot even locate a libphp5.so for FreeBSd to load. How is php
> > invoked?
> 
> Thank you for the guidance.  I had everything installed except
> mod_php5.  Which is why I could not find it.  Why I could not see it
> listed at the top of my pkg search results remains one of life's
> little mysteries.

I usually add a small file, /usr/local/etc/apache24/Includes/php5.conf, containing:

<IfModule mime_module>                                                                                                                                                                                               
AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps                                                                                                                                                                 
</IfModule>
                                                                                                                                                                                                                 
<IfModule dir_module>
    DirectoryIndex index.php index.html                                                                                                                                                                          
</IfModule>

-- 
+-------------------------------+------------------------------------+
| Vennlig hilsen,               | Best regards,                      |
| Trond Endrestøl,              | Trond Endrestøl,                   |
| IT-ansvarlig,                 | System administrator,              |
| Fagskolen Innlandet,          | Gjøvik Technical College, Norway,  |
| tlf. mob.   952 62 567,       | Cellular...: +47 952 62 567,       |
| sentralbord 61 14 54 00.      | Switchboard: +47 61 14 54 00.      |
+-------------------------------+------------------------------------+


More information about the freebsd-questions mailing list