lemonldap-ng/build/lemonldap-ng/_example/etc/apache.conf

130 lines
3.1 KiB
ApacheConf

NameVirtualHost *
# Perl environment
PerlRequire __HANDLER__
<Files ~ "\.(pl)$">
SetHandler perl-script
PerlHandler Apache::Registry
</Files>
<IfModule mod_dir.c>
DirectoryIndex index.pl index.html
</IfModule>
# Common error page and security parameters
ErrorDocument 403 http://auth.__DNSDOMAIN__/error.pl?error=403
ErrorDocument 500 http://auth.__DNSDOMAIN__/error.pl?error=500
ServerSignature Off
LogLevel warn
# Portal virtual host
<VirtualHost *>
ServerName auth.__DNSDOMAIN__
# DocumentRoot
DocumentRoot __PORTALDIR__
<Directory __PORTALDIR__>
Order allow,deny
Allow from all
Options +ExecCGI
</Directory>
# SOAP functions for sessions management (disabled by default)
<Directory __PORTALDIR__/index.pl/adminSessions>
Order deny,allow
Deny from all
</Directory>
# SOAP functions for sessions access (disabled by default)
<Directory __PORTALDIR__/index.pl/sessions>
Order deny,allow
Deny from all
</Directory>
# SOAP functions for configuration access (disabled by default)
<Directory __PORTALDIR__/index.pl/config>
Order deny,allow
Deny from all
</Directory>
# SOAP functions for notification insertion (disabled by default)
<Directory __PORTALDIR__/index.pl/notification>
Order deny,allow
Deny from all
</Directory>
</VirtualHost>
# Manager virtual host
<VirtualHost *>
ServerName manager.__DNSDOMAIN__
# DocumentRoot
DocumentRoot __MANAGERDIR__
<Directory __MANAGERDIR__>
Order deny,allow
Deny from all
Allow from 127.0.0.0/8
Options +ExecCGI
</Directory>
# On-line documentation
Alias /doc/ __DOCDIR__
<Directory __DOCDIR__>
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
# Application Test
<VirtualHost *>
ServerName test1.__DNSDOMAIN__
ServerAlias test2.__DNSDOMAIN__
# SSO protection
PerlHeaderParserHandler My::Package
# DocumentRoot
DocumentRoot __TESTDIR__
<Directory __TESTDIR__>
Order deny,allow
Allow from all
Options +ExecCGI
</Directory>
# Configuration reload mechanism (only 1 per physical server is
# needed): choose your URL to avoid restarting Apache when
# configuration change
<Location /reload>
Order deny,allow
Deny from all
Allow from 127.0.0.0/8
PerlHeaderParserHandler My::Package->refresh
</Location>
# Uncomment this to activate status module
#<Location /status>
# Order deny,allow
# Deny from all
# Allow from 127.0.0.0/8
# PerlHeaderParserHandler My::Package->status
#</Location>
</VirtualHost>
##############################################
## Best performance under ModPerl::Registry ##
##############################################
# Uncomment this to increase performance of Portal:
<Perl>
require Lemonldap::NG::Portal::SharedConf;
Lemonldap::NG::Portal::SharedConf->compile(
qw(delete header cache read_from_client cookie redirect unescapeHTML));
# Uncomment this line if you use Lemonldap::NG menu
require Lemonldap::NG::Portal::Menu;
# Uncomment this line if you use portal SOAP capabilities
require SOAP::Lite;
</Perl>