docs/141937: FreeBSD Handbook on Apache/PHP needs updating

Igor Galić i.galic at brainsware.org
Thu Dec 24 00:50:07 UTC 2009


>Number:         141937
>Category:       docs
>Synopsis:       FreeBSD Handbook on Apache/PHP needs updating
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 24 00:50:06 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Igor Galić
>Release:        
>Organization:
>Environment:
>Description:
There are two issues I have noticed in this document
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-apache.html

On is the section on VirtualHosts, the other on how to configure PHP.

The VirtualHost section is merely imprecise: ``NameVirtualHost *'' covers all interfaces and all ports, thus it's *very* ambiguous.


The second issue is with the PHP configuration, which is plain wrong. AddType is something to communicate the mime-type to the browser. (See http://www.devside.net/articles/php as an example discussion for the why.)
Also it's quite silly to have a <IfModule> section right after a LoadModule, much more so, twice for two directives.
>How-To-Repeat:
Take a look at: 

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-apache.html
>Fix:
The virtualhost section should be replaced with:

NameVirtualHost *:80

And: 

<VirtualHost *:80>
    ServerName www.domain.tld
    DocumentRoot /www/domain.tld
</VirtualHost>

<VirtualHost *:80>
    ServerName www.someotherdomain.tld
    DocumentRoot /www/someotherdomain.tld
</VirtualHost>



The PHP section can be simplified to:

LoadModule php5_module        libexec/apache/libphp5.so
DirectoryIndex index.php index.html
<Files *.php>
    SetHandler application/x-httpd-php
</Files>
## Optionally, pretty Source-Rendering:
#<Files *.phps>
#    SetHandler application/x-httpd-php-source
#</Files>

In general: You can, by now, refer to the PHP documentation: http://php.net/manual/en/install.unix.apache2.php

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-doc mailing list