FGS    Home  |  Docs  |  Support  |  Bugs  |  Downloads

MapTools.org

Configuring FGS

Click on the links below to goto the appropriate note:

  1. Directory Structure
  2. Setting FGS Environment
  3. Starting FGS on Boot
  4. Restarting Apache
  5. Configuring FGS Apache for Port 80
  6. Adding Aliases to Apache
  7. Redirecting main Apache to FGS's Apache

Directory Structure

    - fgs/ - the main directory (referred to as $FGS_HOME)

    - fgs/setenv.sh - sets the FGS environment

         /bin - contains various MapServer and library utilities available
                at command prompt once the FGS environment is set

    - fgs/etc - contains folders as described below

             /cron.daily - cron jobs

             /cron.hourly - cron jobs

             /fgs - contains install.sh, as well as specific module information

             /httpd - conf folder contains a symbolic link to $FGS_HOME/www/conf

             /init.d - this folder contains a symbolic link to apache control 
                       script in $FGS_HOME/www/bin

             /ssl - various SSL components

    - fgs/lib - various libraries

    - fgs/pymod - various python scripts used by GDAL and OGR libraries

    - fgs/share - shared installed libraries

    - fgs/tmp - includes ms_tmp directory where MapServer temp files are
                created

    - fgs/www - folders as decribed below:

             /bin - apache control scripts and php cli

             /cgi-bin - contains mapserver and php executables

             /conf - apache conf files, as well as php.ini

             /conf.d - application aliases (see section below "Adding
                       Aliases to Apache")

             /htdocs - main htdocs folder

             /lib - php installation location (php_mapscript and other php
                    extensions)

             /libexec - php library

             /logs - apache logs

Setting FGS Environment

Before using the FGS environment, you need to set some
environment variables (each time you login) :

  $ cd $FGS_HOME
  $ . setenv.sh

  (replace $FGS_HOME with your FGS path)

OR you can do it automatically each time you log in by doing :

  echo ". $FGS_HOME/setenv.sh" >> ~/.bashrc

Starting FGS on Boot

To start installed FGS's daemon at boot time, do (as root) :

  $ echo "su jeff -c \"( . $FGS_HOME/setenv.sh ; fgs start )\"" >>
                                                    /etc/rc.d/rc.local

  (replace $FGS_HOME with your FGS path)

Restarting Apache

Use the FGS command, as follows:

  $ fgs stop
  $ fgs start

or combine the commands:

  $ fgs stop ; fgs start

Configuring FGS Apache for Port 80

If the FGS environment has been installed as root, you can change the port
number to 80 in this file :

  $FGS_HOME/etc/fgs/pkgs/apache-base/apache.conf

Adding Aliases to Apache

When Apache is started in FGS, the file :

  $FGS_HOME/www/conf/httpd.conf

is read and some strings are replaced ($FGS_HOME, $PORT, etc) and a new
file is created : httpd.conf.live.

You can customize the httpd.conf file in $FGS_HOME/www/conf to fit your
needs (or add a .conf file in $FGS_HOME/www/conf.d/), your changes will
be replicated in the httpd.conf.live file when Apache is restarted
(with fgs stop ; fgs start).

Redirecting main Apache to FGS's Apache

If your Apache has been configured to bind a port other than 80 and you
already have a web server running on port 80, you can add the following
to your main Apache httpd.conf file to redirect to FGS's Apache:

  ProxyPass        /directory/    http://fgsserver:port/directory/
  ProxyPassReverse /directory/    http://fgsserver:port/directory/

You could also use a redirection with iptables.

Last Updated: 2008-05-28

Printer Friendly

 

Docs

Installing FGS

Building your own FGS package

FGSDEV Notes

Modify an FGS package

How to release

Licensing

 

Contact Information

FGS Users List