#==================================================================== # Apache configuration for LemonLDAP::NG Manager #==================================================================== # Uncomment this if no previous NameVirtualHost declaration #NameVirtualHost "*:80" # Manager virtual host (manager.example.com) ServerName %%managerWebName LogLevel notice #ErrorLog ${APACHE_LOG_DIR}/lm_err.log #CustomLog ${APACHE_LOG_DIR}/lm.log combined # FASTCGI CONFIGURATION # --------------------- # 1) URI management RewriteEngine on RewriteRule "^/$" "/psgi/manager-server.fcgi" [PT] # 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$" SSLEngine on SSLCertificateFile %%apache_cert SSLCertificateKeyFile %%server_key SSLProtocol all -SSLv3 -SSLv2 # REST URLs RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|fr-doc|lib|javascript|favicon).*" RewriteRule "^/(.+)$" "/psgi/manager-server.fcgi/$1" [PT] Alias /psgi/ /usr/share/lemonldap-ng/manager/psgi// # 2) FastCGI engine # You can choose any FastCGI system. Here is an example using mod_fcgid # mod_fcgid configuration FcgidMaxRequestLen 2000000 SetHandler fcgid-script Options +ExecCGI # If you want to use mod_fastcgi, replace lines below by: #FastCgiServer /usr/share/lemonldap-ng/manager/psgi/manager-server.fcgi # Or if you prefer to use CGI, use /psgi/manager-server.cgi instead of # /psgi/manager-server.fcgi and adapt the rewrite rules. # GLOBAL CONFIGURATION # -------------------- DocumentRoot /usr/share/lemonldap-ng/manager/ = 2.3> Require all granted Order Deny,Allow Allow from all Options +FollowSymLinks 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 Header append Vary User-Agent env=!dont-vary # Static files (javascripts, HTML forms,...) Alias /static/ /usr/share/lemonldap-ng/manager/static// = 2.3> Require all granted Order Deny,Allow Allow from all Options +FollowSymLinks # On-line documentation Alias /doc/ /usr/share/doc/lemonldap-ng-doc/ Alias /lib/ /usr/share/doc/lemonldap-ng-doc/pages/documentation/current/lib/ = 2.3> Require all granted Order Deny,Allow Allow from all ErrorDocument 404 /notfound.html Options +FollowSymLinks DirectoryIndex index.html start.html # French version (needs fr-doc installation) Alias /fr-doc/ /usr/share/doc/lemonldap-ng-fr-doc/ = 2.3> Require all granted Order Deny,Allow Allow from all ErrorDocument 404 /notfoundfr.html Options +FollowSymLinks DirectoryIndex index.html start.html # Uncomment this if site if you use SSL only #Header set Strict-Transport-Security 15768000