lemonldap-ng/_example/etc/manager-apache2.conf

96 lines
3.1 KiB
Plaintext
Raw Normal View History

#====================================================================
# Apache configuration for LemonLDAP::NG Manager
#====================================================================
# Uncomment this if no previous NameVirtualHost declaration
#NameVirtualHost __VHOSTLISTEN__
# To insert LLNG user id in Apache logs, declare this format and use it in
# CustomLog directive
#LogFormat "%v:%p %h %l %{Lm-Remote-User}o %t \"%r\" %>s %O" llng
# Manager virtual host (manager.__DNSDOMAIN__)
<VirtualHost __VHOSTLISTEN__>
ServerName manager.__DNSDOMAIN__
2015-12-03 06:16:57 +01:00
LogLevel notice
# See above to set LLNG user id in Apache logs
2018-05-22 12:29:03 +02:00
#CustomLog ${APACHE_LOG_DIR}/manager.log llng
2015-12-03 06:16:57 +01:00
#ErrorLog ${APACHE_LOG_DIR}/lm_err.log
# FASTCGI CONFIGURATION
# ---------------------
# 1) URI management
2015-12-03 06:16:57 +01:00
RewriteEngine on
# 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
2018-06-07 18:58:55 +02:00
RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|lib|javascript|favicon).*"
RewriteRule "^/(.+)$" "/manager.fcgi/$1" [PT]
# 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
<Files *.fcgi>
SetHandler fcgid-script
Options +ExecCGI
header unset Lm-Remote-User
</Files>
2015-12-30 21:16:14 +01:00
# If you want to use mod_fastcgi, replace lines below by:
2017-02-28 21:40:29 +01:00
#FastCgiServer __MANAGERSITEDIR__/manager.fcgi
2015-12-16 21:12:01 +01:00
# GLOBAL CONFIGURATION
# --------------------
2017-02-28 21:40:29 +01:00
DocumentRoot __MANAGERSITEDIR__
2015-12-03 06:16:57 +01:00
<Location />
Order Deny,Allow
2017-01-18 21:13:12 +01:00
Allow from all
2015-12-03 06:16:57 +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>
# 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-03-05 13:21:41 +01:00
Order deny,allow
Allow from all
2015-06-10 22:40:23 +02:00
Options +FollowSymLinks
</Directory>
# On-line documentation
2014-04-18 12:17:08 +02:00
Alias /doc/ __DEFDOCDIR__
2017-01-18 22:13:08 +01:00
Alias /lib/ __DEFDOCDIR__pages/documentation/current/lib/
2014-04-18 12:17:08 +02:00
<Directory __DEFDOCDIR__>
2014-03-05 20:17:35 +01:00
Order allow,deny
2014-03-05 13:21:41 +01:00
Allow from all
ErrorDocument 404 /notfound.html
Options +FollowSymLinks
DirectoryIndex index.html start.html
</Directory>
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000
</VirtualHost>