Skip to content

Commit

Permalink
ltb-project#88 configuration apache doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Curie committed Jun 7, 2021
1 parent e03ca75 commit 20a82ee
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions docs/configuration-apache.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
Apache configuration
====================

Virtual host
------------

.. tip:: Debian and RPM packages already include Apache configuration

Here is an example of Apache configuration using a virtual host:

.. code-block:: 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>
You have to change the server name to fit your own domain configuration.

This file should then be included in Apache configuration.

.. tip:: With Debian package, just enable the site like this: a2ensite white-pages

You can also configure White Pages in the default virtual host:

.. code-block:: 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>
Check you configuration and reload Apache:

.. prompt:: bash #

apachectl configtest
apachectl reload

0 comments on commit 20a82ee

Please sign in to comment.