You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
101 lines
3.4 KiB
101 lines
3.4 KiB
#====================================================================
|
|
# 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__
|
|
LogLevel notice
|
|
#ErrorLog ${APACHE_LOG_DIR}/lm_err.log
|
|
#CustomLog ${APACHE_LOG_DIR}/lm.log combined
|
|
|
|
# FASTCGI CONFIGURATION
|
|
# ---------------------
|
|
|
|
# 1) URI management
|
|
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
|
|
RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|fr-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
|
|
FcgidMaxRequestLen 2000000
|
|
<Files *.fcgi>
|
|
SetHandler fcgid-script
|
|
Options +ExecCGI
|
|
<IfModule mod_headers.c>
|
|
header set Content-Security-Policy "default-src 'self';frame-ancestors 'none';form-action 'self';"
|
|
header set X-Content-Type-Options nosniff
|
|
header set X-Frame-Options DENY
|
|
header set X-XSS-Protection "1; mode=block"
|
|
</IfModule>
|
|
</Files>
|
|
|
|
# If you want to use mod_fastcgi, replace lines below by:
|
|
#FastCgiServer __MANAGERSITEDIR__/manager.fcgi
|
|
|
|
# GLOBAL CONFIGURATION
|
|
# --------------------
|
|
|
|
DocumentRoot __MANAGERSITEDIR__
|
|
|
|
<Location />
|
|
Require all granted
|
|
|
|
<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,...)
|
|
|
|
Alias /static/ __MANAGERSTATICDIR__/
|
|
<Directory __MANAGERSTATICDIR__>
|
|
Require all granted
|
|
Options +FollowSymLinks
|
|
</Directory>
|
|
|
|
# On-line documentation
|
|
Alias /doc/ __DEFDOCDIR__
|
|
Alias /lib/ __DEFDOCDIR__pages/documentation/current/lib/
|
|
<Directory __DEFDOCDIR__>
|
|
Require all granted
|
|
ErrorDocument 404 /notfound.html
|
|
Options +FollowSymLinks
|
|
DirectoryIndex index.html start.html
|
|
</Directory>
|
|
|
|
# French version (needs fr-doc installation)
|
|
Alias /fr-doc/ __FRDOCDIR__
|
|
<Directory __FRDOCDIR__>
|
|
Require all granted
|
|
ErrorDocument 404 /notfoundfr.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>
|
|
|