Differences

This shows you the differences between two versions of the page.

Link to this comparison view

documentation:white-pages:latest:config_apache [2017/01/25 12:09] (current)
Line 1: Line 1:
 +====== Apache configuration ======
  
 +<note tip>​Debian and RPM packages already include Apache configuration</​note>​
 +
 +Here is an example of Apache configuration using a virtual host:
 +
 +<file apache>
 +<​VirtualHost *:80>
 +    ServerName wp.example.com
 +
 +    DocumentRoot /​usr/​share/​white-pages/​htdocs
 +    DirectoryIndex index.php
 +
 +    <​Directory /​usr/​share/​white-pages/​htdocs>​
 +        AllowOverride None
 +        <​IfVersion >= 2.3>
 +            Require all granted
 +        </​IfVersion>​
 +        <​IfVersion < 2.3>
 +            Order Deny,Allow
 +            Allow from all
 +        </​IfVersion>​
 +    </​Directory>​
 +
 +    LogLevel warn
 +    ErrorLog /​var/​log/​apache2/​wp_error.log
 +    CustomLog /​var/​log/​apache2/​wp_access.log combined
 +</​VirtualHost>​
 +</​file>​
 +
 +You have to change the server name to fit your own domain configuration.
 +
 +This file should then be included in Apache configuration.
 +
 +<note tip>
 +With Debian package, just enable the site like this:
 +<​code>​
 +# a2ensite white-pages
 +</​code>​
 +</​note>​
 +
 +
 +You can also configure White Pages in the default virtual host:
 +<file apache>
 +Alias /wp /​usr/​local/​white-pages/​htdocs
 +
 +<​Directory /​usr/​local/​white-pages/​htdocs>​
 +        DirectoryIndex index.php
 +        AllowOverride None
 +        <​IfVersion >= 2.3>
 +            Require all granted
 +        </​IfVersion>​
 +        <​IfVersion < 2.3>
 +            Order Deny,Allow
 +            Allow from all
 +        </​IfVersion>​
 +</​Directory>​
 +</​file>​
 +
 +Check you configuration and reload Apache:
 +<​code>​
 +# apachectl configtest
 +# apachectl reload
 +</​code>​