You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

The Directory Project's website is accessible from http://directory.apache.org/

As of November 2008, it looks like that:

How it works?

Overview

The Directory Project's website is maintained in various Confluence spaces, each space corresponding to a specific sub-project (i.e. a single space for Apache Directory Studio, a single space for Apache Directory Server v1.5, etc.)

Every time a page is created, edited or deleted, the AutoExport plugin inside Confluence exports the corresponding on the disk of the server where Confluence is hosted.

Then, these exported spaces are copied and combined using rsync to the final location of the website ('/www/directory.apache.org' on the 'people.apache.org' server).

In details

The Directory Project's website home folder is located at '/www/directory.apache.org' on the 'people.apache.org' server.

Most of the files under this folder are automatically copied every hour from the confluence exported spaces using crontab jobs.
These crontab jobs are defined with the user "pamarcelot" (Pierre-Arnaud Marcelot - pamarcelot@apache.org) and trigger shell scripts containing rsync instructions for copying each space.
The others file are static files which are images, style sheets, or specific download pages.

Below is the structure of the website, explaining where the various parts of the site come from:

/www/directory.apache.org/                             < That's the root of the website
                         |apacheds/
                                  |1.0/                < Copied from /www/confluence-exports/DIRxSRVx10/ using the rsync-DIRxSRVx10.sh shell script
                                  |1.5/                < Copied from /www/confluence-exports/DIRxSRVx11/ using the rsync-DIRxSRVx11.sh shell script
                         |community&resources          < Copied from /www/confluence-exports/directory/ using the rsync-directory.sh shell script
                         |studio                       < Copied from /www/confluence-exports/DIRxSTUDIO/ using the rsync-DIRxSTUDIO.sh shell script
                         |triplesec                    < Copied from /www/confluence-exports/DIRxTRIPLESEC/ using the rsync-DIRxTRIPLESEC.sh shell script

Confluence Export plugin configuration

The default Velocity template used by the AutoExport Plugin

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <link type="text/css" rel="stylesheet" href="$stylesheet">
    <style type="text/css">
      .footer {
        background-image:      url('$confluenceUri/images/border/border_bottom.gif');
        background-repeat:     repeat-x;
        background-position:   left top;
        padding-top:           4px;
        color:                 #666;
      }
    </style>
    <script type="text/javascript" language="javascript">
      var hide = null;
      var show = null;
      var children = null;

      function init() {
        /* Search form initialization */
        var form = document.forms['search'];
        if (form != null) {
          form.elements['domains'].value = location.hostname;
          form.elements['sitesearch'].value = location.hostname;
        }

        /* Children initialization */
        hide = document.getElementById('hide');
        show = document.getElementById('show');
        children = document.all != null ?
                   document.all['children'] :
                   document.getElementById('children');
        if (children != null) {
          children.style.display = 'none';
          show.style.display = 'inline';
          hide.style.display = 'none';
        }
      }

      function showChildren() {
        children.style.display = 'block';
        show.style.display = 'none';
        hide.style.display = 'inline';
      }

      function hideChildren() {
        children.style.display = 'none';
        show.style.display = 'inline';
        hide.style.display = 'none';
      }
    </script>
    <title>$page.title</title>
  </head>
  <body onload="init()">
    <table border="0" cellpadding="2" cellspacing="0" width="100%">
      <tr class="topBar">
        <td align="left" valign="middle" class="topBarDiv" align="left" nowrap>
          &nbsp;$autoexport.breadcrumbs($page)
        </td>
        <td align="right" valign="middle" nowrap>
          <form name="search" action="http://www.google.com/search" method="get">
            <input type="hidden" name="ie" value="UTF-8" />
            <input type="hidden" name="oe" value="UTF-8" />
            <input type="hidden" name="domains" value="" />
            <input type="hidden" name="sitesearch" value="" />
            <input type="text" name="q" maxlength="255" value="" />        
            <input type="submit" name="btnG" value="Google Search" />
          </form>
        </td>
      </tr> 
    </table>

    <div id="PageContent">
      <div class="pageheader" style="padding: 6px 0px 0px 0px;">
        <!-- We'll enable this once we figure out how to access (and save) the logo resource -->
        <!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"-->
        <div style="margin: 0px 10px 0px 10px" class="smalltext">$page.space.name</div>
        <div style="margin: 0px 10px 8px 10px"  class="pagetitle">$page.title</div>

        <div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
          <a href="$confluenceUri/pages/editpage.action?pageId=$page.id">
            <img src="$confluenceUri/images/icons/notep_16.gif"
                 height="16" width="16" border="0" align="absmiddle" title="Edit Page"></a>
            <a href="$confluenceUri/pages/editpage.action?pageId=$page.id">Edit Page</a>
          &nbsp;
          <a href="$confluenceUri/pages/listpages.action?key=$page.spaceKey">
            <img src="$confluenceUri/images/icons/browse_space.gif"
                 height="16" width="16" border="0" align="absmiddle" title="Browse Space"></a>
            <a href="$confluenceUri/pages/listpages.action?key=$page.spaceKey">Browse Space</a>
          &nbsp;
          <a href="$confluenceUri/pages/createpage.action?spaceKey=$page.spaceKey&fromPageId=$page.id">
            <img src="$confluenceUri/images/icons/add_page_16.gif"
                 height="16" width="16" border="0" align="absmiddle" title="Add Page"></a>
          <a href="$confluenceUri/pages/createpage.action?spaceKey=$page.spaceKey&fromPageId=$page.id">Add Page</a>
          &nbsp;
          <a href="$confluenceUri/pages/createblogpost.action?spaceKey=$page.spaceKey&fromPageId=$page.id">
            <img src="$confluenceUri/images/icons/add_blogentry_16.gif"
                 height="16" width="16" border="0" align="absmiddle" title="Add News"></a>
          <a href="$confluenceUri/pages/createblogpost.action?spaceKey=$page.spaceKey&fromPageId=$page.id">Add News</a>
        </div>
      </div>
      <div class="pagesubheading" style="margin: 0px 10px 0px 10px;">
        #editReport()
      </div>

      <div class="pagecontent">
        <div class="wiki-content">
          $body
        </div>

        #if ($page.hasChildren())
          <div class="tabletitle">
            Children
            <span class="smalltext" id="show" style="display: inline;">
              <a href="javascript:showChildren()">Show Children</a></span>
            <span class="smalltext" id="hide" style="display: none;">
              <a href="javascript:hideChildren()">Hide Children</a></span>
          </div>
          <div class="greybox" id="children" style="display: none;">
            #set ($children = $page.children)
            #foreach ($child in $children)
              $autoexport.link($child)
              <span class="smalltext">($child.space.name)</span>
              <br>
            #end
          </div>
        #end

      </div>
    </div>
    <div class="footer">
      Generated by
      $autoexport.confluenceInfo
      $autoexport.autoexportInfo
    </div>
  </body>
</html>

The Velocity template used for Apache Directory Website space

The Velocity templates for Directory spaces have few differences from each other.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <link type="text/css" rel="stylesheet" href="$stylesheet">
    <style type="text/css">
      .footer {
        background-image:      url('$confluenceUri/images/border/border_bottom.gif');
        background-repeat:     repeat-x;
        background-position:   left top;
        padding-top:           4px;
        color:                 #666;
      }
    </style>
    <script type="text/javascript" language="javascript">
      var hide = null;
      var show = null;
      var children = null;

      function init() {
        /* Search form initialization */
        var form = document.forms['search'];
        if (form != null) {
          form.elements['domains'].value = location.hostname;
          form.elements['sitesearch'].value = location.hostname;
        }

        /* Children initialization */
        hide = document.getElementById('hide');
        show = document.getElementById('show');
        children = document.all != null ?
                   document.all['children'] :
                   document.getElementById('children');
        if (children != null) {
          children.style.display = 'none';
          show.style.display = 'inline';
          hide.style.display = 'none';
        }
      }

      function showChildren() {
        children.style.display = 'block';
        show.style.display = 'none';
        hide.style.display = 'inline';
      }

      function hideChildren() {
        children.style.display = 'none';
        show.style.display = 'inline';
        hide.style.display = 'none';
      }
    </script>
    <title>$page.title</title>
  </head>
  <body onload="init()">
    <table border="0" cellpadding="2" cellspacing="0" width="100%">
      <tr class="topBar">
        <td align="left" valign="middle" class="topBarDiv" align="left" nowrap>
          &nbsp;$autoexport.breadcrumbs($page)
        </td>
        <td align="right" valign="middle" nowrap>
          <form name="search" action="http://www.google.com/search" method="get">
            <input type="hidden" name="ie" value="UTF-8" />
            <input type="hidden" name="oe" value="UTF-8" />
            <input type="hidden" name="domains" value="" />
            <input type="hidden" name="sitesearch" value="" />
            <input type="text" name="q" maxlength="255" value="" />        
            <input type="submit" name="btnG" value="Google Search" />
          </form>
        </td>
      </tr> 
    </table>

    <div id="PageContent">
      <div class="pageheader" style="padding: 6px 0px 0px 0px;">
        <!-- We'll enable this once we figure out how to access (and save) the logo resource -->
        <!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"-->
        <div style="margin: 0px 10px 0px 10px" class="smalltext">$page.space.name</div>
        <div style="margin: 0px 10px 8px 10px"  class="pagetitle">$page.title</div>

        <div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
          <a href="http://directory.apache.org/">&gt;&gt; Apache Directory &lt;&lt;</a>
            &nbsp;|&nbsp;
          <a href="http://directory.apache.org/apacheds/1.0/">ApacheDS 1.0</a>
            &nbsp;|&nbsp;
          <a href="http://directory.apache.org/apacheds/1.5/">ApacheDS 1.5</a>
            &nbsp;|&nbsp;
          <a href="http://directory.apache.org/triplesec/">Triplesec</a>
            &nbsp;|&nbsp;
          <a href="http://directory.apache.org/ldapstudio/">Apache Directory Studio</a>
        </div>
      </div>


      <div class="pagecontent">
        <div class="wiki-content">
          $body
        </div>

        #if ($page.hasChildren())
          <div class="tabletitle">
            Children
            <span class="smalltext" id="show" style="display: inline;">
              <a href="javascript:showChildren()">Show Children</a></span>
            <span class="smalltext" id="hide" style="display: none;">
              <a href="javascript:hideChildren()">Hide Children</a></span>
          </div>
          <div class="greybox" id="children" style="display: none;">
            #set ($children = $page.children)
            #foreach ($child in $children)
              $autoexport.link($child)
              <span class="smalltext">($child.space.name)</span>
              <br>
            #end
          </div>
        #end

      </div>
    </div>
    <div class="footer">
      The Apache Directory Project, The Apache Software Foundation
    </div>
  </body>
</html>

The Velocity template used for Apache Wicket Website space

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
##
#set ($images = "http://incubator.apache.org/wicket/images")
#set ($siteroot = "http://cwiki.apache.org/WICKET")
#set ($pageContentHeaderEnabled = false)
##
#if ( $page.title.equals("Index") )
    #set ($title = "Home")
#else
    #set ($title = $page.title)
#end
##
#macro (renderPage $title)
    #set($globalHelper = $action.getGlobalHelper())
    #set($renderer = $globalHelper.getWikiStyleRenderer())

    ##
    ## FIXME: Must be a more efficent way to find a page...
    ##

    #foreach ($child in $page.space.pages)
        #if ($child.title.equals($title))
            #set ($content = $renderer.convertWikiToXHtml($child.toPageContext(), $child.content).trim())

            ##
            ## HACK: Remove the leading <P> and trailing </P>
            ##

            #set ($content = $content.replaceAll("^<[pP]>|</[pP]>$", "") )
            ##set ($content = $content.substring(3, $content.length()))
            ##set ($end = $content.length() - 4)
            ##set ($content = $content.substring(0, $end))

            $content
        #end
    #end
#end
#macro (renderRightSidePage $title)
    #set($globalHelper = $action.getGlobalHelper())
    #set($renderer = $globalHelper.getWikiStyleRenderer())

    ##
    ## FIXME: Must be a more efficent way to find a page...
    ##

    #foreach ($child in $page.space.pages)
        #if ($child.title.equals($title))
            #set ($content = $renderer.convertWikiToXHtml($child.toPageContext(), $child.content).trim())

            ##
            ## HACK: Remove the leading <P> and trailing </P>
            ##

            #set ($content = $content.replaceAll("^<[pP]>|</[pP]>$", "") )
            ##set ($content = $content.substring(3, $content.length()))
            ##set ($end = $content.length() - 4)
            ##set ($content = $content.substring(0, $end))
        #end
    #end
#end
##
#macro (pageContent)
    <div id="PageContent">
        #if ($pageContentHeaderEnabled)
            <div class="pageheader" style="padding: 6px 0px 0px 0px;">
                <div style="margin: 0px 10px 0px 10px" class="smalltext">$page.space.name</div>
                <div style="margin: 0px 10px 8px 10px" class="pagetitle">$page.title</div>
            </div>
        #end

        <div class="pagecontent">
            <div class="wiki-content">
                $body
            </div>
        </div>
    </div>
#end
 <html>
 <head>
  <!-- $PAGETITLE -->
  <title>Apache Wicket - $title</title>
  <link href="http://wicketframework.org/css/site.css" rel="stylesheet" type="text/css" />
  <link rel="SHORTCUT ICON" href="http://wicketframework.org/favicon.ico">
 </head>
  <body bgcolor="#ffffff" link="#6763a9" vlink="#6763a9" topmargin="0" bottommargin="0" leftmargin="0" marginheight="0" marginwidth="0">
  <a name="top"></a>
  <div id="container">
    <div id="banner">
      <div class="clear"><hr/></div>
    </div>
    <div id="breadcrumbs">
    </div>
    <div class="clear"><hr/></div>
    <div id="leftColumn">
      <div id="navcolumn">
        #renderPage("Navigation")
      </div>
    </div>
    <div id="bodyColumn">
      <div id="contentBox">
        #pageContent()
      </div>
      <div class="clear"><hr/></div>
    </div>
    <div id="footer">
      <div class="xright">© 2004-2006 Apache Wicket developers</div>
      <div class="clear"><hr/></div>
    </div>
  </div>
</body>
</html>

The currectly used HTTPD URL Rewriting configuration

RewriteBase /

RewriteRule ^apacheds/1\.0$ apacheds/1.0/ [R,L]
RewriteRule ^apacheds/1\.0/(.*)$ http://cwiki.apache.org/DIRxSRVx10/$1 [P,L]

RewriteRule ^apacheds/1\.5$ apacheds/1.5/ [R,L]
RewriteRule ^apacheds/1\.5/(.*)$ http://cwiki.apache.org/DIRxSRVx11/$1 [P,L]

RewriteRule ^triplesec$ triplesec/ [R,L]
RewriteRule ^triplesec/(.*)$ http://cwiki.apache.org/DIRxTRIPLESEC/$1 [P,L]

RewriteRule ^ldapstudio$ ldapstudio/ [R,L]
RewriteRule ^ldapstudio/update$ ldapstudio/update/ [R,L]
RewriteCond %{REQUEST_URI} !^/ldapstudio/update/.*$
RewriteRule ^ldapstudio/(.*)$ http://cwiki.apache.org/DIRxSTUDIO/$1 [P,L]

RewriteRule ^community&resources$ community&resources/ [R,L]
RewriteRule ^community&resources/(.*)$ http://cwiki.apache.org/directory/$1 [P,L]

RewriteRule ^resources$ resources/ [R,L]

RewriteCond %{REQUEST_URI} !^/ldapstudio/update/.*$
RewriteCond %{REQUEST_URI} !^/resources/.*$
RewriteRule ^(.*)$ http://cwiki.apache.org/DIRxSITE/$1 [P,L]

Apache Proxy

See http://www.apache.org/dev/project-site.html

These sites are rsync'ed into production on ajax every hour (starting at 11 minutes past). Deletes happen once per day.

You can view your changes before they go into production by using a trick with your web browser. Temporarily set the preferences to use 140.211.11.10:80 as your HTTP proxy. Beware: that IP address and crontab might change at some time - if so then please send a patch for this doc.

  • No labels