# This file is for Apache 1.3.x and Apache 2.x
#
# Add this to your Apache configuration, it makes
# the Xymon webpages and cgi-scripts available in the
# "@XYMONHOSTURL@" and "@XYMONCGIURL@" URLs.


# NB: The "Alias" line below must NOT be used if you have
#     the Xymon webfiles as the root URL. In that case,
#     you should instead set this:
#
#          DocumentRoot @INSTALLWWWDIR@

Alias @XYMONHOSTURL@  "@INSTALLWWWDIR@"
<Directory "@INSTALLWWWDIR@">
    Options Indexes FollowSymLinks Includes MultiViews
    <IfModule mod_authz_core.c>
        # Apache 2.4+
        Require local
    </IfModule>
    <IfModule !mod_authz_core.c>
        Order deny,allow
        Allow from localhost ::1/128
    </IfModule>
</Directory>

ScriptAlias @XYMONCGIURL@/ "@CGIDIR@/"
<Directory "@CGIDIR@">
    AllowOverride None
    Options ExecCGI Includes
    <IfModule mod_authz_core.c>
        # Apache 2.4+
        Require local
    </IfModule>
    <IfModule !mod_authz_core.c>
        Order deny,allow
        Allow from localhost ::1/128
    </IfModule>
</Directory>


# Rewrite-rules for migrating from the URL's used in Hobbit
RewriteEngine On

RewriteRule ^@XYMONHOSTURL@/bb.html @XYMONHOSTURL@/xymon.html [R=permanent,L]
RewriteRule ^@XYMONHOSTURL@/bb2.html @XYMONHOSTURL@/nongreen.html [R=permanent,L]
RewriteRule ^@XYMONHOSTURL@/bbnk.html @XYMONHOSTURL@/critical.html [R=permanent,L]

RewriteRule ^@XYMONCGIURL@/bb-hist.sh @XYMONCGIURL@/history.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/bb-eventlog.sh @XYMONCGIURL@/eventlog.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/bb-rep.sh @XYMONCGIURL@/report.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/bb-replog.sh @XYMONCGIURL@/reportlog.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/bb-snapshot.sh @XYMONCGIURL@/snapshot.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/bb-findhost.sh @XYMONCGIURL@/findhost.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/bb-csvinfo.sh @XYMONCGIURL@/csvinfo.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/hobbitcolumn.sh @XYMONCGIURL@/columndoc.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/bb-datepage.sh @XYMONCGIURL@/datepage.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/hobbitgraph.sh @XYMONCGIURL@/showgraph.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/bb-hostsvc.sh @XYMONCGIURL@/svcstatus.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/bb-histlog.sh @XYMONCGIURL@/historylog.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/hobbit-confreport.sh @XYMONCGIURL@/confreport.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/hobbit-confreport-critical.sh @XYMONCGIURL@/confreport-critical.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/hobbit-nkview.sh @XYMONCGIURL@/criticalview.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/hobbit-certreport.sh @XYMONCGIURL@/certreport.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/hobbit-nongreen.sh @XYMONCGIURL@/nongreen.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/hobbit-hostgraphs.sh @XYMONCGIURL@/hostgraphs.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/hobbit-ghosts.sh @XYMONCGIURL@/ghostlist.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/hobbit-notifylog.sh @XYMONCGIURL@/notifications.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/hobbit-hostlist.sh @XYMONCGIURL@/hostlist.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/hobbit-perfdata.sh @XYMONCGIURL@/perfdata.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/hobbit-topchanges.sh @XYMONCGIURL@/topchanges.sh [R=permanent,L]

RewriteRule ^@XYMONCGIURL@/bb-ack.sh @XYMONCGIURL@/acknowledge.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/hobbit-enadis.sh @XYMONCGIURL@/enadis.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/hobbit-nkedit.sh @XYMONCGIURL@/criticaleditor.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/hobbit-ackinfo.sh @XYMONCGIURL@/ackinfo.sh [R=permanent,L]
RewriteRule ^@XYMONCGIURL@/hobbit-useradm.sh @XYMONCGIURL@/useradm.sh [R=permanent,L]

