Redatam+SP REtrieval of DATa for Small Areas by Microcomputer Redatam+ SP WebServer (R+SP WebServer) Installation and Configuration for the Windows Operating System REDATAM+SP is a software system developed by the Latin American and Caribbean Demographic Center (CELADE), which is the Population Division of the Economic Commission for Latin America and the Caribbean (ECLAC), United Nations. www.eclac.cl/celade/redatam WebServer_Install_ENG 2006.03.31 ENGLISH
Table of Contents I. Introduction... 2 II. Download R+WebServer... 2 III. R+WebServer Installation... 2 IV. The Apache Web Server... 3 IV.1 Apache Installation... 3 IV.2 Check the Apache installation... 4 IV.3 Configure Apache to handle the R+WebServer... 5 IV.4 Restart Apache... 5 V. The IIS Web Server ( Internet Information Server )... 5 V.1 IIS Installation... 5 V.2 Check IIS Installation... 6 V.3 Activate Application... 7 V.4 redatam Virtual Directory... 7 V.5 cgibin Virtual Directory... 9 V.6 Protections for the cgibin Directory... 9 V.7 New Web Service Extension ( IIS version 6.0 )... 10 VI. Check the R+WebServer execution... 10 VII. Using other databases with the REDATAM server... 11 1
I. Introduction The purpose of this document is to serve as a fast guide for the R+WebServer installation, using either one of the Web Servers described here, the Apache or the Internet Information Server (IIS). The choice between them depends on the user s environment and/or his/her preferences. This guide was designed in such a way that it is not necessary any previous knowledge about any of the Web Servers (Apache or IIS). The users being familiar with the Server to be used can then adjust the installation according to their needs. The first chapters describe the download and installation of the R+WebServer application itself. The next chapters are dedicated to each one of the Web Servers (Apache or IIS), and finally the document shows how to check the application and how to modify it to add new Redatam databases. II. Download R+WebServer The most common way to do that is by downloading it from the REDATAM official web site at: http://www.eclac.cl/celade/redatam/ In this page you will find a link to an updated version of the software in the Updates section. Download the R+WebServer_V4Rev00.exe file to any temporary directory in your hard disk (the version number (4) and/or the revision number (00) could be changed as a new version / revision of the software becomes available). III. R+WebServer Installation Make a new folder named Servers in the C: disk (C:\Servers), and within this folder create another folder to be named as Redatam (C:\Servers\Redatam). 1 It is important that you have written rights over this disk. Extract the installation files by executing the R+WebServer_V4Rev00.exe file (double click over the filename) in the "C:\Servers\redatam\" directory. 2 The whole structure of the main installation directory should be as show in the picture below: 1 You can use another disk, as well as different directory names. However, be careful to change accordingly the remaining instructions in this document. 2 This document can be found also in the Docs installation directory. 2
The redatam directory is divided into three folders: 1. cgibin, which should contain the Redatam databases, hence it should be the protected part of the installation; 2. docs, having all the documentation; and 3. htdocs, the application s visible part, which should be known by the users through its alias redatam. IV. The Apache Web Server This chapter is a fast guide for the people who want to use Apache and do not have it installed yet. It is not an Apache User s Guide. The whole process was designed to make it as easy as possible, but it does not limit in any way the possibility to tailor it according to your preferences. It has only two steps: 1. The installation itself (if it is not already installed); and 2. To edit the Apache s configuration file to make the R+WebServer available (copy and paste two text blocks contained in this document). IV.1 Apache Installation Look for the Apache icon in the ToolBar at the bottom right of your screen to see if it is connected (Passing the mouse over it should show Running all Apache Services ). If the Apache server is not yet installed, go to http://httpd.apache.org/ and download the last official version (not Beta). This version should be located at Win32 Binary (MSI Installer) in the Apache site. For the installation process we recommend to use the default options (next next next). It is not necessary to fill in the options Net Domain, Server name and Administrator s email. Choose the typical installation. 3
IV.2 Check the Apache installation After being installed the Apache server should be automatically started and working. Look for the Apache icon in the Toolbar at the bottom right of your screen to see if it is connected. Using any browser, access the default Apache page by typing: This should show the following page: http://localhost/ 4
IV.3 Configure Apache to handle the R+WebServer Using any text editor, open the "httpd.conf" file located at the "conf" directory under the Apache installation directory (C:\Program Files\Apache Group\Apache2\conf). Find Alias /icons/ and make another entry for the "redatam" user as follows: Alias /redatam "C:/servers/redatam/htdocs/" <Directory "C:/servers/redatam/htdocs"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory> Find ScriptAlias /cgi-bin/ and make another entry for the "cgibin" script as follows: ScriptAlias /cgibin/ "C:/servers/redatam/cgibin/" <Directory "C:/servers/redatam/cgibin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> Save the "httpd.conf" file. IV.4 Restart Apache Look for the Apache icon in the Toolbar at the bottom right of your screen and left click it to show the existing options, and choose to Restart it. Alternatively go to the Start button, Program Files, Apache, Control Apache Server and Restart. V. The IIS Web Server ( Internet Information Server ) Similarly to the Apache, the IIS is also very simple. The difference between them is that the IIS s configuration is done through its service manager (a wizard) instead of having to edit the configuration file as in the case of Apache. V.1 IIS Installation In order to check if the IIS is already installed, go to the Windows Control Panel, choose the Add/Remove Programs option, and then use the Add/Remove Windows Components button at the left side of the screen. The system should display the following: 5
If the IIS server is already installed the system will display a check mark at the Application Server line, as above. If not, mark it and then proceed with the installation process. It is recommended to use the default options (next... next... next). During the process the system will ask for the Windows Installation CD. V.2 Check IIS Installation Using any browser of your choice, access the server s default page by typing: http://localhost/ If it is the first time you installed IIS, the system should display something like: Otherwise, it will show the default page that was designed by the webmaster. If there are errors in the displayed page, check the IIS configuration, or refer to the Microsoft documentation at (http://www.microsoft.com/). 6
V.3 Activate Application To activate the application you have to use the Internet Information Server Manager, which is found through the Windows Control Panel, then Administrative Tools, and then Internet Information Server Manager. Another way to get there is to run the inetmgr command. The system should show something like: V.4 redatam Virtual Directory In the IIS Manager, to create a new virtual directory, right click on Default Web Site, and then choose New and Virtual Directory. The system will start a Wizard to receive some parameters, the first one being the Virtual Directory Alias, which should be redatam (case sensitive), as in the following picture: Press Next and then Browse to find the htdocs directory, located where the R+WebServer installation files were extracted, for example: "C:\servers\redatam\htdocs", as in the picture below: 7
The next step is to assign Access Permissions, marking only the Read permission, as in the following picture: Click Next to finish the process, and then, using any browser of your choice, access the Redatam page by typing: http://localhost/redatam/ If you followed exactly all the previous steps, the screen should display: 8
V.5 cgibin Virtual Directory Repeat the previous process in V.4 to create another virtual directory with the following parameters: Alias : cgibin ( case sensitive ) Path : "cgibin" subdirectory where the R+WebServer installation files were extracted, for example: "C:\servers\redatam\cgibin" Permissions : Only Execute (be careful, it is not Run Scripts). V.6 Protections for the cgibin Directory Since the cgibin virtual directory will store all Redatam databases, it should be wise to establish some access restrictions. Right click the cgibin entry in the IIS Manager and select Properties. First you have to change the way to access this directory: none should be marked, as in the following screen: After that, choose the Documents tab and make sure that the Enable default content page is not marked (disabled): Press OK to apply those changes and, before closing the IIS Manager, check if the installed IIS version is the 6.0 one (Help / About). 9
V.7 New Web Service Extension ( IIS version 6.0 ) This IIS version, by default, does not allow CGI applications to be executed, so, it has to be changed, because this is precisely the case of the R+WebServer. In order to do that, go to the IIS Manager, right click the Web Service Extension and choose Add New Service Extension. The system shows the following: The suggested name should be redatam and the files to be added are RpWebEngine.exe and WebUtilities.exe, located in the cgibin directory, for example "C:\servers\redatam\cgibin, as in: VI. Check the R+WebServer execution Using any browser of your choice, access the REDATAM page by typing the following: http://localhost/redatam/ If you followed exactly all the previous steps, the screen should display: 10
After clicking the Enter Test Site button the system should display the following screen: VII. Using other databases with the REDATAM server Edit the webservermain.inl file located in the \REDATAM\CGIBIN folder, and make new entries in the NODEs list of the STRUCTURE section, creating also the respective sections corresponding to the databases, which should be stored in the \REDATAM\CGIBIN\RPBASES folder, trying to follow the New Miranda example. 11