Skip to content

Commit

Permalink
Doc for multi tenancy
Browse files Browse the repository at this point in the history
  • Loading branch information
coudot committed May 22, 2023
1 parent df1657c commit 1702087
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions docs/general-parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,40 @@ White Pages default configuration file is ``white-pages/conf/config.inc.php``. I
Do not copy ``config.inc.php`` into ``config.inc.local.php``, as the first one includes the second.
You would then create an infinite loop and crash your application.

Multi tenancy
-------------

You can load a specific configuration file by passing a HTTP header.
This feature is disabled by default. To enable it:

.. code-block:: php
$header_name_extra_config = "WP-Extra-Config";
Then if you send the header ``WP-Extra-Config: domain1``, the file
``conf/config.inc.domain1.php`` will be loaded.

Using Apache, we may set such header using the following:

.. code-block:: apache
<VirtualHost *:80>
ServerName wp.domain1.com
RequestHeader setIfEmpty WP-Extra-Config domain1
[...]
</VirtualHost>
Using Nginx, we could use instead:

.. code-block:: nginx
server {
[...]
location ~ \.php {
fastcgi_param WP-Extra-Config domain1;
[...]
}
Language
--------

Expand Down

0 comments on commit 1702087

Please sign in to comment.