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

89 lines
2.6 KiB
Plaintext
Raw Normal View History

#====================================================================
# Apache configuration for LemonLDAP::NG Portal
#====================================================================
# Uncomment this if no previous NameVirtualHost declaration
#NameVirtualHost __VHOSTLISTEN__
# Portal Virtual Host (auth.__DNSDOMAIN__)
<VirtualHost __VHOSTLISTEN__>
ServerName auth.__DNSDOMAIN__
2017-01-03 18:23:38 +01:00
# DocumentRoot (FCGI scripts)
DocumentRoot __PORTALDIR__
<Directory __PORTALDIR__>
2014-03-05 13:21:41 +01:00
Order allow,deny
Allow from all
Options +ExecCGI +FollowSymLinks
</Directory>
2017-01-03 18:23:38 +01:00
RewriteEngine On
RewriteCond "%{REQUEST_FILENAME}" "!^/(?:(?:static|javascript|favicon).*|.*\.fcgi)$"
RewriteRule "^/(.+)$" "/index.fcgi/$1" [PT]
2017-01-03 18:23:38 +01:00
<Files *.fcgi>
2016-04-01 12:46:12 +02:00
SetHandler fcgid-script
Options +ExecCGI
</Files>
2017-01-03 18:23:38 +01:00
# Static files
Alias /static/ __PORTALSTATICDIR__/
<Directory __PORTALSTATICDIR__>
Order allow,deny
Allow from all
Options +FollowSymLinks
</Directory>
<Location /static/>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 month"
</IfModule>
</Location>
<IfModule mod_dir.c>
2017-01-03 18:23:38 +01:00
DirectoryIndex index.fcgi index.html
</IfModule>
# SOAP functions for sessions management (disabled by default)
2017-01-03 18:23:38 +01:00
<Location /index.fcgi/adminSessions>
2014-03-05 13:21:41 +01:00
Order deny,allow
Deny from all
</Location>
# SOAP functions for sessions access (disabled by default)
2017-01-03 18:23:38 +01:00
<Location /index.fcgi/sessions>
2014-03-05 13:21:41 +01:00
Order deny,allow
Deny from all
</Location>
# SOAP functions for configuration access (disabled by default)
2017-01-03 18:23:38 +01:00
<Location /index.fcgi/config>
2014-03-05 13:21:41 +01:00
Order deny,allow
Deny from all
</Location>
# SOAP functions for notification insertion (disabled by default)
2017-01-03 18:23:38 +01:00
<Location /index.fcgi/notification>
2014-03-05 13:21:41 +01:00
Order deny,allow
Deny from all
</Location>
2017-01-03 18:23:38 +01:00
# Enabe compression
2010-11-06 11:28:33 +01:00
<Location />
<IfModule mod_deflate.c>
2014-03-05 13:21:41 +01:00
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
2010-11-06 11:28:33 +01:00
</IfModule>
<IfModule mod_headers.c>
2014-03-05 13:21:41 +01:00
Header append Vary User-Agent env=!dont-vary
2010-11-06 11:28:33 +01:00
</IfModule>
</Location>
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000
</VirtualHost>