2014-11-04 18:20:10 +01:00
|
|
|
#====================================================================
|
|
|
|
# Apache configuration for LemonLDAP::NG Manager
|
|
|
|
#====================================================================
|
|
|
|
|
|
|
|
# Uncomment this if no previous NameVirtualHost declaration
|
|
|
|
#NameVirtualHost __VHOSTLISTEN__
|
|
|
|
|
|
|
|
# Manager virtual host (manager.__DNSDOMAIN__)
|
|
|
|
<VirtualHost __VHOSTLISTEN__>
|
|
|
|
ServerName manager.__DNSDOMAIN__
|
2015-12-02 23:28:05 +01:00
|
|
|
LogLevel notice
|
|
|
|
#ErrorLog ${APACHE_LOG_DIR}/lm_err.log
|
|
|
|
#CustomLog ${APACHE_LOG_DIR}/lm.log combined
|
2014-11-04 18:20:10 +01:00
|
|
|
|
2015-12-04 11:27:48 +01:00
|
|
|
# FASTCGI CONFIGURATION
|
|
|
|
# ---------------------
|
|
|
|
|
|
|
|
# 1) URI management
|
2015-12-02 23:28:05 +01:00
|
|
|
RewriteEngine on
|
2015-12-04 11:27:48 +01:00
|
|
|
|
2015-12-16 21:12:01 +01:00
|
|
|
RewriteRule "^/$" "/psgi/manager-server.fcgi" [PT]
|
2015-12-04 11:27:48 +01:00
|
|
|
# For performances, you can delete the previous RewriteRule line after
|
|
|
|
# puttings html files: simply put the HTML results of differents modules
|
|
|
|
# (configuration, sessions, notifications) as manager.html, sessions.html,
|
|
|
|
# notifications.html and uncomment the 2 following lines:
|
|
|
|
# DirectoryIndex manager.html
|
|
|
|
# RewriteCond "%{REQUEST_FILENAME}" "!\.html$"
|
|
|
|
|
|
|
|
# REST URLs
|
2016-03-05 13:02:33 +01:00
|
|
|
RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|fr-doc|lib|javascript|favicon).*"
|
2015-12-13 08:25:32 +01:00
|
|
|
RewriteRule "^/(.+)$" "/psgi/manager-server.fcgi/$1" [PT]
|
2015-12-04 11:27:48 +01:00
|
|
|
|
2016-02-08 13:57:53 +01:00
|
|
|
Alias /psgi/ __MANAGERPSGIDIR__/
|
2015-12-04 11:27:48 +01:00
|
|
|
|
|
|
|
# 2) FastCGI engine
|
|
|
|
|
|
|
|
# You can choose any FastCGI system. Here is an example using mod_fcgid
|
|
|
|
# mod_fcgid configuration
|
2016-02-17 18:28:27 +01:00
|
|
|
FcgidMaxRequestLen 2000000
|
2015-12-04 11:27:48 +01:00
|
|
|
<Directory __MANAGERPSGIDIR__>
|
|
|
|
SetHandler fcgid-script
|
|
|
|
Options +ExecCGI
|
|
|
|
</Directory>
|
2015-12-02 23:28:05 +01:00
|
|
|
|
2015-12-30 21:16:14 +01:00
|
|
|
# If you want to use mod_fastcgi, replace lines below by:
|
2015-12-13 08:25:29 +01:00
|
|
|
#FastCgiServer __MANAGERPSGIDIR__manager-server.fcgi
|
2015-12-04 11:27:48 +01:00
|
|
|
|
2015-12-16 21:12:01 +01:00
|
|
|
# Or if you prefer to use CGI, use /psgi/manager-server.cgi instead of
|
|
|
|
# /psgi/manager-server.fcgi and adapt the rewrite rules.
|
|
|
|
|
2015-12-04 11:27:48 +01:00
|
|
|
# GLOBAL CONFIGURATION
|
|
|
|
# --------------------
|
|
|
|
|
|
|
|
DocumentRoot __MANAGERDIR__
|
2015-12-02 23:28:05 +01:00
|
|
|
|
|
|
|
<Location />
|
2015-12-04 11:27:48 +01:00
|
|
|
<IfVersion >= 2.3>
|
|
|
|
Require all granted
|
|
|
|
</IfVersion>
|
|
|
|
<IfVersion < 2.3>
|
|
|
|
Order Deny,Allow
|
|
|
|
Allow from all
|
|
|
|
</IfVersion>
|
|
|
|
Options +FollowSymLinks
|
2015-12-02 23:28:05 +01:00
|
|
|
|
|
|
|
<IfModule mod_deflate.c>
|
|
|
|
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css
|
|
|
|
SetOutputFilter DEFLATE
|
|
|
|
BrowserMatch ^Mozilla/4 gzip-only-text/html
|
|
|
|
BrowserMatch ^Mozilla/4\.0[678] no-gzip
|
|
|
|
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
|
|
|
|
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
|
|
|
|
</IfModule>
|
|
|
|
<IfModule mod_headers.c>
|
|
|
|
Header append Vary User-Agent env=!dont-vary
|
|
|
|
</IfModule>
|
|
|
|
</Location>
|
|
|
|
|
2015-12-04 11:27:48 +01:00
|
|
|
# Static files (javascripts, HTML forms,...)
|
2016-02-08 13:57:53 +01:00
|
|
|
|
|
|
|
Alias /static/ __MANAGERSTATICDIR__/
|
2015-06-10 22:40:23 +02:00
|
|
|
<Directory __MANAGERSTATICDIR__>
|
2014-11-04 18:20:10 +01:00
|
|
|
<IfVersion >= 2.3>
|
|
|
|
Require all granted
|
|
|
|
</IfVersion>
|
|
|
|
<IfVersion < 2.3>
|
|
|
|
Order Deny,Allow
|
|
|
|
Allow from all
|
|
|
|
</IfVersion>
|
2015-06-10 22:40:23 +02:00
|
|
|
Options +FollowSymLinks
|
|
|
|
</Directory>
|
2014-11-04 18:20:10 +01:00
|
|
|
|
|
|
|
# On-line documentation
|
|
|
|
Alias /doc/ __DEFDOCDIR__
|
|
|
|
Alias /lib/ __DEFDOCDIR__lib/
|
|
|
|
<Directory __DEFDOCDIR__>
|
|
|
|
<IfVersion >= 2.3>
|
|
|
|
Require all granted
|
|
|
|
</IfVersion>
|
|
|
|
<IfVersion < 2.3>
|
|
|
|
Order Deny,Allow
|
|
|
|
Allow from all
|
|
|
|
</IfVersion>
|
|
|
|
ErrorDocument 404 /notfound.html
|
|
|
|
Options +FollowSymLinks
|
|
|
|
</Directory>
|
|
|
|
|
|
|
|
# French version (needs fr-doc installation)
|
|
|
|
Alias /fr-doc/ __FRDOCDIR__
|
|
|
|
<Directory __FRDOCDIR__>
|
|
|
|
<IfVersion >= 2.3>
|
|
|
|
Require all granted
|
|
|
|
</IfVersion>
|
|
|
|
<IfVersion < 2.3>
|
|
|
|
Order Deny,Allow
|
|
|
|
Allow from all
|
|
|
|
</IfVersion>
|
|
|
|
ErrorDocument 404 /notfoundfr.html
|
|
|
|
Options +FollowSymLinks
|
|
|
|
</Directory>
|
|
|
|
|
2016-02-11 10:36:12 +01:00
|
|
|
# Uncomment this if site if you use SSL only
|
|
|
|
#Header set Strict-Transport-Security 15768000
|
2014-11-04 18:20:10 +01:00
|
|
|
</VirtualHost>
|