<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<article>
  <title>YES Linux Website Administration Guide</title>

  <articleinfo>
    <revhistory>
      <revision>
        <revnumber>$Revision: 1.5 $</revnumber>

        <date>$Date: 2005/03/18 05:41:31 $</date>

        <authorinitials>$Author: boo $</authorinitials>
      </revision>
    </revhistory>

    <legalnotice>
      <para>This document is Licensed under the GPL</para>
    </legalnotice>

    <copyright>
      <year>1999 - 2005</year>

      <holder>YES Technology Association</holder>
    </copyright>

    <author id="original">
      <personname>
        <firstname>Arthur</firstname>

        <surname>Copeland</surname>
      </personname>
    </author>
  </articleinfo>

  <section>
    <title>Overview</title>

    <para>This document is a Guide on how to Administer Website using YES
    Linux. In the guide you will be walked through the process of configuring
    websites both manually and through the web based administration
    application, and the location to upload files to your websites using
    WebDav. The audience of this guide is any current User of YES
    Linux.</para>

    <para>If help is ever needed please visit <ulink
    url="http://youresale.com/support/">http://youresale.com/support/</ulink>.
    You will find both commerical and free online support <ulink
    url="http://www.yeslinux.org/forum">http://www.yeslinux.org/forum</ulink>.
    The commercial support is provided by YEA (YourESale Authorized
    Administrators).</para>
  </section>

  <section>
    <title>Requirements</title>

    <para>YES Linux requirements:</para>

    <itemizedlist>
      <listitem>
        <para>A fully Installed and Configured instance of YES Linux</para>
      </listitem>
    </itemizedlist>
  </section>

  <section>
    <title>Design</title>

    <para>The Website Administration Design uses the internal Ant Based YES
    Linux Configuration system to manipulate configure websites, a Template
    Apache Fragment, and a Naming Convention. To change the behavior it is
    recommend you either Modify the XML Build file or the Apache template
    fragment.</para>

    <para>Using the configuration system you can do one of the following tasks
    Create a new Virtual Host, Enable an Existing Virtual Host, or Disable an
    Existing Virtual Host. To remove or delete a Virtual Host you will have to
    have either a shell account or console access then manually remove all the
    fragments.</para>

    <section>
      <title>Naming Convention</title>

      <para>The naming convention for all the files are
      &lt;domainname&gt;commonname. The list of files that create created
      during a creation are as follows:</para>

      <itemizedlist>
        <listitem>
          <para>Apache Fragment - &lt;domainname&gt;-vhost.yes (Enabled) or
          &lt;domainname&gt;-vhost.no (Disabled)</para>
        </listitem>

        <listitem>
          <para>Top Level Directory for the Domain -
          /yesdata/www/&lt;domainname&gt;/</para>
        </listitem>

        <listitem>
          <para>Sub Directories</para>

          <itemizedlist>
            <listitem>
              <para>docs - HTML Document Root</para>
            </listitem>

            <listitem>
              <para>cgi-bin - CGI Bin directory</para>
            </listitem>

            <listitem>
              <para>ssl.crt - SSL Certificate</para>
            </listitem>

            <listitem>
              <para>ssl.key - SSL Private Key</para>
            </listitem>
          </itemizedlist>
        </listitem>

        <listitem>
          <para>Apache Log Files - /var/log/httpd/</para>

          <itemizedlist>
            <listitem>
              <para>&lt;domainname&gt;-access_log</para>
            </listitem>

            <listitem>
              <para>&lt;domainname&gt;-error_log</para>
            </listitem>

            <listitem>
              <para>&lt;domainname&gt;-ssl_access_log</para>
            </listitem>

            <listitem>
              <para>&lt;domainname&gt;-ssl_error_log</para>
            </listitem>
          </itemizedlist>
        </listitem>
      </itemizedlist>
    </section>

    <section>
      <title>Build File</title>

      <para>The build file that drives the whole process is called
      /etc/yes/yes-website.xml. If you wish to modify the process of creating,
      disabling, or enabling of Virtual Hosts this is the file to
      manipulate.</para>
    </section>

    <section>
      <title>Apache Template Fragment</title>

      <para>The template fragement that drives the whole process is called
      /yesdata/www/templates/virtualhosting-template-fragment.yes. It contains
      the default version of the apache fragment that will dirve the virtual
      domain. If you want to change anything in the final Apache Fragment you
      should modify this template. Not that you <emphasis role="bold">SHOULD
      NOT</emphasis> modify the phrase "VIRTUALDOMAINNAME", because it is a
      token that is replaced by the domain name during creation and is used by
      the Build File.</para>
    </section>
  </section>

  <section>
    <title>Manual Configuration</title>

    <para>To manually configure a new Website you will need to have root
    access</para>

    <para>In each of the commands below <emphasis role="bold">REPLACE
    <emphasis>&lt;new domain name&gt;</emphasis></emphasis> with the name of
    the Domain you wish to manipulate.</para>

    <orderedlist>
      <listitem>
        <para>Create a VirtualDomain - /usr/sbin/yesconfig
        -DdomainName=&lt;new domain name&gt; -t createVirtualHost -c
        /etc/yes/yes-website.xml</para>
      </listitem>

      <listitem>
        <para>Enable a VirtualDomain - /usr/sbin/yesconfig
        -DdomainName=&lt;new domain name&gt; -t enableVirtualHost -c
        /etc/yes/yes-website.xml</para>
      </listitem>

      <listitem>
        <para>Disable a VirtualDomain - /usr/sbin/yesconfig
        -DdomainName=&lt;new domain name&gt; -t disableVirtualHost -c
        /etc/yes/yes-website.xml</para>
      </listitem>
    </orderedlist>
  </section>

  <section>
    <title>Web Administration Configuration</title>

    <para><emphasis role="bold">THE ADMINISTRATION SCREEN WILL NOT
    AUTOMATICALLY REFRESH WHEN A VITRUAL DOMAIN IS SUCCESSFULLY CREATED,
    DISABLED, OR ENABLED. YOU WILL MANUALLY HAVE TO CLICK ON THE VIRTUAL HOST
    Link.</emphasis></para>

    <para>Using the Web Based administration tool you will not have the
    ability to manipulate the Default "Prmary" Website that is only accessible
    manually. The administration tool is available either throufh the
    Administration Interface /yesadmin/ =&gt; Website Administration or
    directly /webadmin/. Once you are in the Website Administration Interface
    you will need to click on the Virtual Host Link. In this interface you
    have the ability to Create, Disable, or Enable Virtual Hosts. During the
    loading on the page if there is any existing Virtual Hosts the will be
    displayed for you the the enabled hosts first, then all the disabled
    domains following.</para>

    <para>To create a new Virtual Host just enter the domain name in the
    supplied text box then click on the create button. Once the pages stops
    processing you will have you new virutal host instance. As stated above
    the site <emphasis role="bold">WILL NOT</emphasis> refresh the page, but
    the domain will be created. The reason for this is that during the
    manipulation process of the webserver is reloaded so the change is
    instant, thus we loose our context. Since php doesn't have native threads
    it is not possible to easily preform the updating asynchronously.</para>

    <para>To enable or disable a Virtual Host just find the domain you wish to
    modify and click on the link next to the name. Again as stated above the
    site <emphasis role="bold">WILL NOT</emphasis> refresh the page, but the
    domain will be created. The reason for this is that during the
    manipulation process of the webserver is reloaded so the change is
    instant, thus we loose our context. Since php doesn't have native threads
    it is not possible to easily preform the updating asynchronously.</para>
  </section>

  <section>
    <title>WebDav Access</title>

    <para>All Virtual Hosts are created with WebDav access using both HTTP and
    HTTPS with the following naming convention: /yes&lt;domainname&gt;. For
    example if you create domain called testme.com, you will have a WebDav
    location of http://testme.com/yestestme.com or
    https://testme.com/yestestme.com</para>

    <para>The default access is limited to the admin group (which by default
    only contains the user created during the install) and you internal
    network. To change any of these restrictions modify the configuration
    fragment located in /yesdata/www/conf.d/&lt;domainname&gt;-vhost.yes or
    /yesdata/www/conf.d/&lt;domainname&gt;-vhost.no depending on if it is
    enabled or disabled. Once you have made the changes you will need to
    reload apache, "/etc/init.d/httpd reload".</para>
  </section>

  <section>
    <title>Conclusion</title>

    <para>For more information on YES Linux Website Administration look here
    <ulink
    url="http://www.yeslinux.org/forum/viewforum.php?f=33">http://www.yeslinux.org/forum/viewforum.php?f=33</ulink>.</para>
  </section>
</article>