##
## Internet Exchange Messaging Server (IEMS) 6
## Apache Configuration
##

## The Internet Exchange Messaging Server (IEMS) is made up of an administrative
## module, and several end user modules.   These can be presented via the web as
## a single URL or machine, or separated into two URL's (virutal machines).   If
## broken into separate virtual machines, external security mechanisms (firewalls)
## can be employed to enforce different security policies on the administrative
## and end user modules.
##
## NOTE: Previous versions of the IEMS configuration file attempted to reconfigure
##       the default settings for the selected ports.   Two problems surfaced with
##       this approach - the changes affected all virtual hosts, not just IEMS, and
##       as such made it difficult to configure multiple virtual hosts for sites
##       needing to run additional services via Apache.   In addition, if both the
##       administrative and end user modules were configured to use the default of
##       port 80 - this led to Apache runtime warnings.  These problems have been
##       overcome in this version as the IEMS modules are configured as standard
##       Apache Virtual Hosts.
##
## The Virtual Host definitions below all utilize IP address based hosts, rather 
## than Named Virtual Hosts.   The reason is that IP based selection is used in 
## some SSL configurations (default RedHat 8.0 for instance), and port assignments 
## using Named Virtual Hosts can be problematic at times.  If you need to use 
## Named Virtual hosts rather than IP, the sections below can be used as a guide.
## All that needs to change is the Virtual Host declaration, and to make sure 
## that a "NameVirtualHost *" entry is enabled in the main Apache configuration 
## file, together with making sure that all other IP based declarations are 
## converted.   The VirtualHost declarations below should then be changed to 
## "<VirtualHost *>", and make sure that the ServerName declaration properly 
## identifies your machine.
##
## The VirtualHost declaration is of the form:
##
##   <VirtualHost IP-ADDRESS:PORT-ASSIGNMENT>
##
## It is initially setup by the installation utility to reference the IP address
## of the current machine, and port 80 (standard HTTP):
##
##   <VirtualHost 11.22.33.44:80>
##
## where 11.22.33.44 is the IP address of the machine IEMS is installed on.   To
## change the port that will be listening, simply change the PORT-ASSIGNMENT part.
## In this example, if we wanted to change the listening port to 8080, the 
## declaration would be as follows:
##
##   <VirtualHost 11.22.33.44:8080>
##
## Each VirtualHost declaration has after it declarations for ServerName, and
## DocumentRoot, among others.    Make sure that the ServerName declaration
## properly identifies the virtual machine you are defining.   If you want this
## to be a name other than the primary name of the machine, it should be changed
## here.   In this case, make sure that an Address Record (DNS) associated with
## this IP address and name is defined.
##
## For Virtual Hosts that need to listen on ports other than the standard port
## 80, there needs to be a corresponding Listen directive.   For example, if the
## administrative interface is relocated to port 8080, the following also needs
## to be specified in the configuration file:
##
## Listen 11.22.33.44:8080
##
## NOTE: Be sure to only use one Listen directive for each IP/Port combination.
##       Multiple declarations for the same combination will result in Apache
##       startup errors.  In particular, be sure not to define for a second time
##       a Listen for port 80 for the main IP addressed used, as this is most
##       likely already defined in the main configuration file.
##
##
## The remaining entries should remain unchanged.
##
##
## SSL CONSIDERATIONS
## ==================
##
## If https (SSL) is to be configured, several additional considerations have to 
## be taken into account.  Unfortunately several of the various Linux distributions
## differ in their default SSL configurations.   Below are a list and description
## of several SSL variables that need to be set in the main configuration file.
## Please check your configuration file (/etc/httpd/conf.d/* in the case or RedHat 8
## and perhaps other Apache 2 installations).
##
## Some distributions have these already set, while others need to have the appropriate
## configurations added
##
## SSLLog      logs/ssl_engine_log
## SSLLogLevel info
##
## Note: the above entries are set by default in RedHat 7.3 but not in RedHat 8.o or 
##       Mandrake 9.0.
##
## AddType application/x-x509-ca-cert .crt
## AddType application/x-pkcs7-crl    .crl
##
## Note: the above entries are set by default in RedHat 7.3 and 8.0, but not in 
## Mandrake 9.0.
##
##
## NOTE: The standard port used for SSL is 443, but any port can be used.   When
##       doing a port reassignment for either SSL use or normal HTTP, be sure
##       that the appropriate Listen directive is used, together with the
##       corresponding VirtualHost directive.
##
## In addition to the above global SSL configuration settings, the following SSL 
## variables need to be set for each Virtual Host that uses SSL:
##
## SSLEngine
## SSLCipherSuite
## SSLCertificateFile
## SSLCertificateKeyFile
##
## A description of each along with the recommended setting follows:
##
##
##   SSL Engine Switch:
##   ------------------
##   Enable/Disable SSL for this virtual host.
## SSLEngine on
##
##   SSL Cipher Suite:
##   -----------------
##   List the ciphers that the client is permitted to negotiate.
##   See the mod_ssl documentation for a complete list.
## SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
##
##   Server Certificate:
##   -------------------
##   Point SSLCertificateFile at a PEM encoded certificate.  If
##   the certificate is encrypted, then you will be prompted for a
##   pass phrase.  Note that a kill -HUP will prompt again. A test
##   certificate can be generated with 'make certificate' under
##   built time. Keep in mind that if you've both a RSA and a DSA
##   certificate you can configure both in parallel (to also allow
##   the use of DSA ciphers, etc.)
## SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
##
##   Server Private Key:
##   -------------------
##   If the key is not combined with the certificate, use this
##   directive to point at the key file.  Keep in mind that if
##   you've both a RSA and a DSA private key you can configure
##   both in parallel (to also allow the use of DSA ciphers, etc.)
## SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
##
##
##
## CONFIGURATION INSTRUCTIONS
## ==========================
##
## This configuration file is broken down into two sections.   The first, which
## is enabled by default on installation, is for a single virtual host, where 
## the administrative and end user modules are presented together.   By default,
## the name of the Virtual Host is the primary name by which the machine is
## known together with its IP address.   In the case where a machine has multiple
## IP addresses, this is whatever can be determined to be the primary interface.
## The default port assignment is port 80 (standard HTTP).  If these settings
## do not relfect the needs of your site, the VirtualHost and/or ServerName
## settings should be changed as needed.
##
## The section used for a single virtual machine starts with the comment line:
##
## START SINGLE VIRTUAL MACHINE BLOCK
##
## and ends with
##
## END SINGLE VIRTUAL MACHINE BLOCK
##
##
## The second section of this configuration file is used for configuring IEMS 
## to run the administrative modules on a different virtual host from the end 
## user modules.  If you decide to run in this mode, first comment out the
## configuration section for the single virtual machine.   This is everything 
## between the two comment lines above.    Lines starting with the '#' are 
## treated as comments by Apache.    Next remove the comments in the section,
## which begins with the comment line:
##
## BEGIN DUAL VIRTUAL MACHINE BLOCK
##
## and ends with
##
## END DUAL VIRTUAL MACHINE BLOCK
##
## There are two VirtualHost blocks in this section - one for the administrative
## modules and one for the end user modules.   As with the single host setup,
## configure the VirtualHost and ServerName variables to match your needs.   All
## other configuration options should stay the way they are.


 
##
##
## IEMS Administration + End User Interface - Single Virtual Machine
##
## START SINGLE VIRTUAL MACHINE BLOCK
##
#Listen 11.22.33.44:80
<VirtualHost 11.22.33.44:80>
   ServerName yourhost.domain.com
   DirectoryIndex	index.htm index.html
   DocumentRoot	"/opt/iems/htdocs/"

## Enable the following for SSL support
##
## SSLEngine on
## SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
## SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
## SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key

   <Directory	"/opt/iems/htdocs/">
     Options Indexes FollowSymLinks
     AllowOverride AuthConfig
     Order allow,deny
     Allow from all
   </Directory>

   ScriptAlias	/iems/cgi-bin/		"/opt/iems/htdocs/iems/sysad/cgi-bin/"
   ScriptAlias	/iems/sysad/cgi-bin/	"/opt/iems/htdocs/iems/sysad/cgi-bin/"
   <Directory	"/opt/iems/htdocs/iems/sysad/cgi-bin/">
     AllowOverride None
     Options	None
   </Directory>

   ScriptAlias	/iems/scripts/		"/opt/iems/htdocs/iems/user/cgi-bin/"
   ScriptAlias	/iems/user/cgi-bin/	"/opt/iems/htdocs/iems/user/cgi-bin/"
   <Directory	"/opt/iems/htdocs/iems/user/cgi-bin/">
     AllowOverride None
     Options None
   </Directory>

   <Directory	"/opt/iems/htdocs/iems/help/">
     Options Indexes FollowSymLinks
     AllowOverride AuthConfig
     Order allow,deny
     Allow from all
   </Directory>
   
   <Directory	"/opt/iems/htdocs/iems/index-pictures/">
     Options Indexes FollowSymLinks
     AllowOverride AuthConfig
     Order allow,deny
     Allow from all
   </Directory>
   
   <Directory	"/opt/iems/htdocs/iems/module-pictures/">
     Options Indexes FollowSymLinks
     AllowOverride AuthConfig
     Order allow,deny
     Allow from all
   </Directory>
   
   <Directory	"/opt/iems/htdocs/iems/style/">
     Options Indexes FollowSymLinks
     AllowOverride AuthConfig
     Order allow,deny
     Allow from all
   </Directory>
   
   <Directory	"/opt/iems/htdocs/iems/user/">
     Options Indexes FollowSymLinks
     AllowOverride AuthConfig
     Order allow,deny
     Allow from all
   </Directory>
   
</VirtualHost>
##
## END SINGLE VIRTUAL MACHINE BLOCK
##

###############################################################################
###############################################################################
##                     DUAL VIRTUAL MACHINE CONFIGURATION                    ##
###############################################################################
###############################################################################

##
## IEMS Administration Interface - Dual Virtual Machine Configuration
##
## BEGIN DUAL VIRTUAL MACHINE BLOCK
##
#Listen 11.22.33.44:8888
#<VirtualHost 11.22.33.44:8888>
#   ServerName yourhost.domain.com
#   DirectoryIndex	index.htm index.html
#   DocumentRoot	"/opt/iems/htdocs/"
#
## Enable the following for SSL support
##
## SSLEngine on
## SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
## SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
## SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
#
#   <Directory	"/opt/iems/htdocs/">
#     Options Indexes FollowSymLinks
#     AllowOverride AuthConfig
#     Order allow,deny
#     Allow from all
#   </Directory>
#
#   ScriptAlias	/iems/cgi-bin/		"/opt/iems/htdocs/iems/sysad/cgi-bin/"
#   ScriptAlias	/iems/sysad/cgi-bin/	"/opt/iems/htdocs/iems/sysad/cgi-bin/"
#   <Directory	"/opt/iems/htdocs/iems/sysad/cgi-bin/">
#     AllowOverride None
#     Options	None
#   </Directory>
#
#   ScriptAlias	/iems/scripts/		"/opt/iems/htdocs/iems/user/cgi-bin/"
#   ScriptAlias	/iems/user/cgi-bin/	"/opt/iems/htdocs/iems/user/cgi-bin/"
#   <Directory	"/opt/iems/htdocs/iems/user/cgi-bin/">
#     AllowOverride None
#     Options None
#   </Directory>
#
#</VirtualHost>
#
##
## IEMS User Interface - Dual Virtual Machine Configuration
##
#Listen 11.22.33.44:80
#<VirtualHost 11.22.33.44:80>
#   ServerName yourhost.domain.com
#   DocumentRoot	"/opt/iems/htdocs/"
#   DirectoryIndex	index.htm index.html
#
## Enable the following for SSL support
##
## SSLEngine on
## SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
## SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
## SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
#
#   <Directory	"/opt/iems/htdocs/iems">
#     Order deny,allow
#     Deny from all
#   </Directory>
#   
#   <Directory	"/opt/iems/htdocs/iems/help/">
#     Options Indexes FollowSymLinks
#     AllowOverride AuthConfig
#     Order allow,deny
#     Allow from all
#   </Directory>
#   
#   <Directory	"/opt/iems/htdocs/iems/index-pictures/">
#     Options Indexes FollowSymLinks
#     AllowOverride AuthConfig
#     Order allow,deny
#     Allow from all
#   </Directory>
#   
#   <Directory	"/opt/iems/htdocs/iems/module-pictures/">
#     Options Indexes FollowSymLinks
#     AllowOverride AuthConfig
#     Order allow,deny
#     Allow from all
#   </Directory>
#   
#   <Directory	"/opt/iems/htdocs/iems/style/">
#     Options Indexes FollowSymLinks
#     AllowOverride AuthConfig
#     Order allow,deny
#     Allow from all
#   </Directory>
#   
#   <Directory	"/opt/iems/htdocs/iems/user/">
#     Options Indexes FollowSymLinks
#     AllowOverride AuthConfig
#     Order allow,deny
#     Allow from all
#   </Directory>
#   
#   ScriptAlias	/iems/scripts/		"/opt/iems/htdocs/iems/user/cgi-bin/"
#   ScriptAlias	/iems/user-cgi-bin/	"/opt/iems/htdocs/iems/user/cgi-bin/"
#   <Directory	"/opt/iems/htdocs/iems/user/cgi-bin/">
#     AllowOverride None
#     Options None
#   </Directory>
#</VirtualHost>
##
## END DUAL VIRTUAL MACHINE BLOCK
##
