Home
News

Distribution


Developers Security
Think Linux!
Join
Bookmarks
Project Independence


Setting Up a Local Mirror

The first thing you should do if you are interested in getting involved is setting up a mirror of the site on your desktop. This is done as follows:

Getting the Software

  1. Download and install ssh.
  2. Install apache. It comes with your distribution, so you don't have to download it.

Download the Website

Download the tarball of the website ( about 500k ) and unpack the files into some directory. I recommend having all the files under /home/indy/public_html as on the site, but you may put them anywhere else.

Configure Apache

  1. First, you need to set up a virtual host. Edit httpd.conf ( in Redhat, the precise location is /etc/httpd/conf/httpd.conf ) You need to add a virtual host directive:
    <VirtualHost independence>
    # This should be the directory where you unpacked the website.
    Documentroot /home/indy/public_html
    ServerName independence
    </VirtualHost>
    
  2. Add a host entry so that "independence" resolves to your own machine. In other words, add this to /etc/hosts:
    independence	127.0.0.1
    
  3. You need to enable server side includes. This requires a line in the srm.conf file of your apache config that looks like this: ( on Redhat, it's /etc/httpd/conf/srm.conf )
    AddHandler server-parsed .shtml 
    
  4. You will need to enable server side includes in access.conf. ( On Redhat, /etc/httpd/conf/access.conf ) The safest way to do this is to add a section to access.conf like this:
    # this needs to be the directory where you installed the site.
    <Directory /home/indy/public_html>
    # A reasonable set of defaults. Apache defaults to fairly paranoid  
    # settings for security reasons. 
    Options Indexes Includes FollowSymLinks
    Allow from all
    </Directory>
    

Restart Apache

As root, type
killall -HUP httpd
To make apache re-read it's configuration. Point your browser to http://independence and you should see the website.

About the Design of the Site

The site makes heavy use of server side includes to make maintenance easier. The page headers are kept in files all called head.shtml. To get a listing of these files, simply cd to the web directory and run
find . -name head\.shtml
Similarly, the footers are included in files called footer.shtml The html for server side includes is very simple. Usually, it just involves pulling a header or footer into the page. The way you do it is something like like this ( ie here's an example ):
<!--#include virtual="/developers/head.shtml" -->
The server side directives are also used to define and print variables. This is also easy:
<!--#set var="title" value="Web HOWTO" -->
sets the server variable title to the value "Web HOWTO". The directive
<!--#echo var="title" -->
Prints out the value of the variable title.

For more information, see your Apache docs. Try pointing your browser to

/home/httpd/html/manual/mod/mod_include.html

A Template For Webpages

If you are planning on contributing a page to the site, you should start with the Generic template and edit that. Note that this file should be in the top of the website tarball. Of course, it looks like a blank page in your browser because it has a .html extension, so the server doesn't mark it up ( otherwise you wouldn't be able to download it directly from the website ).

As a general rule, all pages should be given a .shtml extension so that the server applies the appropriate markup directives.

Changing the Layout of the Site

For those graphic design gurus who want to improve the look of the site, the best way to start is probably by changing the head.shtml and footer.shtml files. The idea is that content and design should be seperated, and most of the design part of it should go into generic files that can be pulled into other pages via server side includes. This way, we avoid the ugly situation where we are required to maintain several instances of the same text passages within the body text of the pages.

Some General Tips

  • If you change a bunch of files, and can't remember which ones you changed, you can use a find command: for example, to find all files modified in the last day, you could use

    find . -mtime -1
    
    To find all files modified in the last 60 minutes, you can use
    find . -mmin -60
    

  • Using scp to upload multiple files is a pain. There are several ways to get around this:

    • FTP to the incoming directory, then copy by hand
    • Build a tarball of the files you modify. This is easy enough:

      tar cvzf files.tgz `find . -type f -mtime -1`
      then upload that. Then unpack it on the website.

    • You can use ssh to forward ports. The idea is that you can make the remote ftp server available on a (non-priveliged) port on your machine. Eg:

      ssh -L 1234:cran.seul.org:21 -l username cran.seul.org
      Then you can ftp via port forwarding. Eg:
      ftp -p localhost 1234
      Note that the -p is for passive mode, which you need to use in order for this port-forwarding to work.

  • "GUI HTML editors" are (usually) bad. They frequently make an awful mess of existing pages. They tend to do things like munge links, etc. Try to learn to write html by hand where possible. The only situation where visual tools offer considerable advantage is for layout-critical tasks. But editing content is not a layout-critical task. On the other hand, designing templates ( such as page headers/footers ) certainly is a layout-critical task.

    The upshot is that if you are designing the layout of a page ( which you should only do when you are working on something like a footer or a general template ), then "visual" html tools are OK ( provided that you go through and fix the messy code by hand afterwords ). Otherwise, they are a bad idea.

  • The site uses cascading style sheets (CSS) for markup. Don't use font tags, or physical markup tags. Recommended tags include: <H1> <H2> <H3> <H4> <EM> ( italic ) <STRONG> ( bold, similar to <B> ) <UL> <OL> <LI>

    Tags that should not be used for markup include <FONT > , <B> , <I>


  • Project coordinator
    jfm2@club-internet.fr
    Web Weaver
    elflord@pegasus.rutgers.edu
    Mailing list subscriptions
    majordomo@seul.org
    (put subscribe independence-l in the body)