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.
88 lines
2.9 KiB
88 lines
2.9 KiB
#====================================================================
|
|
# 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__
|
|
|
|
# DocumentRoot (FCGI scripts)
|
|
DocumentRoot __PORTALSITEDIR__
|
|
<Directory __PORTALSITEDIR__>
|
|
Require all granted
|
|
Options +ExecCGI +FollowSymLinks
|
|
</Directory>
|
|
RewriteEngine On
|
|
# For performances, you can put static html files: simply put the HTML
|
|
# result (example: /oauth2/checksession.html) as static file. Then
|
|
# uncomment the following line.
|
|
# RewriteCond "%{REQUEST_FILENAME}" "!\.html$"
|
|
RewriteCond "%{REQUEST_FILENAME}" "!^/(?:(?:static|javascript|favicon).*|.*\.fcgi)$"
|
|
RewriteRule "^/(.+)$" "/index.fcgi/$1" [PT]
|
|
|
|
# Note that Content-Security-Policy header is generated by portal itself
|
|
<Files *.fcgi>
|
|
SetHandler fcgid-script
|
|
#CGIPassAuth on
|
|
Options +ExecCGI
|
|
</Files>
|
|
|
|
# Static files
|
|
Alias /static/ __PORTALSTATICDIR__/
|
|
<Directory __PORTALSTATICDIR__>
|
|
Require all granted
|
|
Options +FollowSymLinks
|
|
</Directory>
|
|
<Location /static/>
|
|
<IfModule mod_expires.c>
|
|
ExpiresActive On
|
|
ExpiresDefault "access plus 1 month"
|
|
</IfModule>
|
|
</Location>
|
|
|
|
<IfModule mod_dir.c>
|
|
DirectoryIndex index.fcgi index.html
|
|
</IfModule>
|
|
|
|
# REST/SOAP functions for sessions management (disabled by default)
|
|
<Location /index.fcgi/adminSessions>
|
|
Require all denied
|
|
</Location>
|
|
|
|
# REST/SOAP functions for sessions access (disabled by default)
|
|
<Location /index.fcgi/sessions>
|
|
Require all denied
|
|
</Location>
|
|
|
|
# REST/SOAP functions for configuration access (disabled by default)
|
|
<Location /index.fcgi/config>
|
|
Require all denied
|
|
</Location>
|
|
|
|
# REST/SOAP functions for notification insertion (disabled by default)
|
|
<Location /index.fcgi/notification>
|
|
Require all denied
|
|
</Location>
|
|
|
|
# Enabe compression
|
|
<Location />
|
|
<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>
|
|
|
|
# Uncomment this if site if you use SSL only
|
|
#Header set Strict-Transport-Security 15768000
|
|
</VirtualHost>
|
|
|
|
|