Differences

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

Link to this comparison view

documentation:self-service-password:1.4:config_apache [2018/07/10 10:26] (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 ssp.example.com
 +
 +    DocumentRoot /​usr/​local/​self-service-password
 +    DirectoryIndex index.php
 +
 +    AddDefaultCharset UTF-8
 +
 +    <​Directory /​usr/​local/​self-service-password>​
 +        AllowOverride None
 +        <​IfVersion >= 2.3>
 +            Require all granted
 +        </​IfVersion>​
 +        <​IfVersion < 2.3>
 +            Order Deny,Allow
 +            Allow from all
 +        </​IfVersion>​
 +    </​Directory>​
 +
 +    <​Directory /​usr/​local/​self-service-password/​scripts>​
 +        AllowOverride None
 +        <​IfVersion >= 2.3>
 +            Require all denied
 +        </​IfVersion>​
 +        <​IfVersion < 2.3>
 +            Order Deny,Allow
 +            Deny from all
 +        </​IfVersion>​
 +    </​Directory>​
 +   
 +    LogLevel warn
 +    ErrorLog /​var/​log/​apache2/​ssp_error.log
 +    CustomLog /​var/​log/​apache2/​ssp_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 self-service-password
 +</​code>​
 +</​note>​
 +
 +
 +You can also configure Self Service Password in the default virtual host:
 +<file apache>
 +Alias /ssp /​usr/​local/​self-service-password
 +
 +<​Directory /​usr/​local/​self-service-password>​
 +        AllowOverride None
 +        <​IfVersion >= 2.3>
 +            Require all granted
 +        </​IfVersion>​
 +        <​IfVersion < 2.3>
 +            Order Deny,Allow
 +            Allow from all
 +        </​IfVersion>​
 +        DirectoryIndex index.php
 +        AddDefaultCharset UTF-8
 +</​Directory>​
 +
 +<​Directory /​usr/​local/​self-service-password/​scripts>​
 +        AllowOverride None
 +        <​IfVersion >= 2.3>
 +            Require all denied
 +        </​IfVersion>​
 +        <​IfVersion < 2.3>
 +            Order Deny,Allow
 +            Deny from all
 +        </​IfVersion>​
 +</​Directory>​
 +</​file>​
 +
 +Check you configuration and reload Apache:
 +<​code>​
 +# apachectl configtest
 +# apachectl reload
 +</​code>​