This page is part of © FOTW Flags Of The World website

Build your own FOTW copy or mirror

Last modified: 1999-10-22 by skip at vexillum
Keywords: fotw | mirror | web | ftp |
Links: FOTW homepage | search | disclaimer and copyright | write us | mirrors



Warning: Before building a local copy or a mirror of FOTW web site, read carefully our copyright rules

Build your local copy of FOTW web site

To build your own local copy of FOTW web site:

REQUIREMENTS:

Approximately 60 megabytes of space as of 10/1/99
  1. On your local hard drive create a directory called fotw. Create three subdirectories under that directory called flags, images, and misc.
  2. Using an ftp program log into fotw.vexillum.com using the login anonymous and your email address as the password
  3. Download all the files in the directories flags, images, and misc on the ftp site to the same directories on your hard drive.
  4. Now you can browse the site on your hard drive by opening the file /fotw/flags/index.html with your browser.

Keep your copy updated

FOTW contents change almost every day. To update your copy you must have the updated files. Updating your local copy once per month is the recommended time interval. Follow these instructions:
  1. If you know the date of the last time you updated your local copy of FOTW skip to the next step. If you do not know open up each of fotw directories (flags, images, misc) on your local site with your file manager program and find the latest file by sorting in descending order by date/time.
  2. Using an ftp program log into fotw.vexillum.com using the login anonymous and your email address as the password.
  3. In each of the directories on the ftp site - sort by date and download those files which have been changed since the last time you updated your site into their respective directories on your local hard disk.
  4. To automatically update your local copy with the newest files please see the instructions below for creating a mirror site.

Build your FOTW mirror site

Using the following instructions you can automatically build and keep your local copy of FOTW web site updated. Then you may make it available to the Internet community as a FOTW mirror.

REQUIREMENTS:

Unix, WindowsNT, or Windows95/98.
Perl4 or preferably Perl5 installed.
Ability to use FTP, Perl, and Crontab
60+ Megabytes of space as of 10/1/99 (plus space to grow)

The following instructions are for a Unix server. Some modifications might need to be made for your particular operating system.

If you do not have the ability to run a crontab or programs on your server contact your administrator. If you are able to run perl and programs but are unable to use cron you can still use the automated update program but you will have to use it manually instead of having the server run it at set time intervals.

WARNING:

Flags of the World takes no responsibility at all for any damages caused to your computer or other computers by using these instructions and programs. Do so at your sole risk and responsibility. The following instructions were tested and verified to work on a system using Mirror 2.9, Perl 5, Red Hat Linux 5.1, on an Intel architecture machine. You may need to modify these instructions to get the program to work for your particular OS and hardware.

INSTRUCTIONS PART ONE - MIRROR:

  1. You need to obtain a copy of mirror for your operating system. You can download mirror 2.9 from our anonymous ftp site at ftp://fotw.vexillum.com/mirror. For full documentation and updated mirror programs as well as other mirror solutions please visit http://src.doc.ic.ac.uk/packages/mirror/.
  2. Create under a directory such as fotw the directories flags, images, misc, control, and custom.
  3. Create a directory to place the mirror program in. Uncompress the mirror package into that directory.
  4. Locate the file "mirror.defaults" which should be in the mirror directory. Open it in your text editor.
  5. Find the line "package=defaults" and change it to read "package=fotw".
  6. Find the line "hostname=sunsite.org.uk" and change it to read "hostname=YOURDOMAIN" where YOURDOMAIN is your web site's domain name.
  7. Find the line "local_dir=/public/" and change it so that it points to the full path of the directory that you created the directories flags, images, custom, control, and misc in. In unix you can type "pwd" at the prompt to tell what the path is where you are in the directory tree. Your entry should look something like "local_dir=/usr/home/YOURDOMAIN/html/fotw/" depending on your server filesystem tree.
  8. Find the line "remote_password=wizards@sunsite.org.uk" and change it so that it reads "remote_password=YOUREMAILADDRESS" where YOUREMAILADDRESS is the email address that you normally use for your site.
  9. Insert a new line after the "remote_password=YOUREMAILADDRESS" that reads "remote_user=anonymous".
  10. Insert a new line after the last one that says "remote_dir=\".
  11. Insert a new line after the last one that says "site=fotw.vexillum.com".
  12. At the beginning of the following lines place the "#" symbol (similar to other lines in the text) so that they read as follows:

    # dir_mode=0755
    # file_mode=0444
    # user=0
    # group=0
    # update_log=

  13. Please make sure that you made all of the changes as listed above and that the information entered is correct. You are now ready to test the program. Type "perl mirror.pl -n". If all is well you will get normal messages showing what would happen if you ran the program for real (and this will take some time because there are literally thousands of files to transfer). If you get an error again check the modifications you made to the mirror.defaults file. Make sure that everything works correctly under the test mode before running the program "live" on your data.
  14. WARNING! Please do not run this command unless you are sure the test mode above worked correctly. Now you are ready to actually create your mirror site. Run the mirror program by typing "perl mirror.pl". The site will be transferred and put in the proper locations automatically.

INSTRUCTIONS PART 2 - CUSTOM BANNER AND PAGE

You can put your banner (or the banner of the organization that hosts the site) on all the FOTW pages as follows:
  1. Prepare your banner as a gif file. The preferred size is 468 x 60 pixels.
  2. Name it linea2.gif
  3. Put the file in the /custom directory.
  4. change the contents of host.html file so that it points to your homepage and place it in the custom directory. If you want it to redirect to your home page automatically add the following line in the host.html file:

    <meta http-equiv="REFRESH" content="1; URL=http://www.yourdomain.com">
Note - if you are updating your site manually you will need to copy the linea2.gif file into the images directory and the host.html file into the flags directory each time you update or exclude those files when you retrieve files from the ftp site. It is placed in the custom directory and copied by the cron job when using the automatic process so that when the originals are overwritten the custom ones are kept safe in another directory.

INSTRUCTIONS PART 3 - CONTROL SCRIPT

This file runs the mirror program and then copies the files linea2.gif and host.html files from the custom directory to the live directories.
  1. Using your text editor create a file called "control.bash" in the control directory.
  2. Type the following replacing the PATH in the following example to the absolute paths on your server:

    #!/bin/sh
    perl PATH/mirror/mirror.pl
    cp PATH/custom/linea2.gif PATH/images/linea2.gif
    cp PATH/custom/host.html PATH/flags/host.html

    NOTE: The syntax for this step can be very different on other OS such as WindowsNT. Please consult your operating system documentation to accomplish the same thing.

INSTRUCTIONS PART 4 - CRONTAB:

  1. Create a new file called "cron.txt" with your text editor in the control directory.
  2. On the first line put "0 0 * * * perl PATH TO CONTROL.BASH/control.bash" where the PATH TO CONTROL.BASH is the absolute path to the control.bash script. So the resulting entry should look something like this:
    0 0 * * * /usr/home/domainname/html/control/control.bash
  3. The above line assumes that you want to update the site every day at midnight. The syntax for cron is as follows:

    The minute of the hour(0-59)
    The hour of the day(0-23)
    The day of the month (1-31)
    The month (1-12)
    The day of the week (Sun=0, Mon=1, ... Sat=6)

    Minute - Hour - Day - Month - Day of Week
    * stands for no entry

    So if you wanted to update your mirror every Sunday at 3:00a.m. you would use the syntax "0 3 * * 0" instead of "0 0 * * *".
  4. Save the file.
  5. At the command prompt type "crontab cron.txt".
  6. Then type "crontab -l". This should list the crontab contents that you just typed.

CONGRATULATIONS!

You have just now successfully set up an automatically updated FOTW mirror site!

You can not
  • modify the contents of FOTW pages and images
  • put third-party advertisement on FOTW pages (e.g. you cannot put third-party logos and advertisement in linea2.gif file)
  • sell the access to FOTW pages and images

Make your mirror an official one

After your mirror site is set up and freely visitable, you may add it to the list of the FOTW official mirror sites: Send a message to the FOTW Director and your site will be added to the official mirror sites list. Sites that are not at least updated monthly may be deleted from the list without notice.



CHANNELS :: Compare Country infoCountry guide & StudyFlagsMapsSightseeingTravel WarningsHotel Directory DESTINATIONS :: AsiaAfricaCaribbean Middle EastNorth AmericaSouth AmericaCentral AmericaOceania PacificEuropePolar Regions UTILITIES :: WeatherWorld TimeISD CodesTravel Links Link Exchange
PHOTO SPECIAL ::
DestinationsMonuments WONDERS :: AncientModernNatural

1UpTravel.com | Privacy Policy