Installing Frontpage Extensions for Apache on Linux

by Nathan Wallace (Oct 31, 1999)

Introduction

This document describes how to install the Microsoft FrontPage extensions for Apache on Linux. These instructions were written specifically using Red Hat Linux 6.1 and Apache 1.3.9.

The specifics of these instructions assume that you have Apache setup and layed out as per these instructions.

Getting mod_frontpage

  1. These instructions assume that you are working as root:
        su root
    

  2. I save all downloads in:
        /usr/local/download
    
    Create that directory now if it doesn't already exist:
        mkdir /usr/local/download
    

  3. The first thing we need to get are the cgi binaries to perform the frontpage operations on the server. This requires a quick registration before the massive download of the software. You want the Front Page 200 Server Extensions, which are in the file called:
        fp40.linux.tar.gz
    
    The scary thing is that the combined download for MySQL, Apache and PHP is less than the size of this Frontpage Extension download. Save this as:
        /usr/local/download/fp40.linux.tar.gz
    

  4. There is an installation script available to help us, fp_install.sh, which you need to download and save as:
        /usr/local/download/fp_install.sh
    

  5. You can get the latest version of mod_frontpage from here. I am using mod_frontpage-VR4.tar.gz for these instructions. Here are the ftp commands:
        cd /usr/local/download
        ftp ftp.vr.net
        cd pub/apache/mod_frontpage
        bin
        get mod_frontpage-VR4.tar.gz
        bye
    

Pre-Installation for Front Page Extensions

  1. The download script we downloaded above relies on the existence of the srm.conf and access.conf location pointers in httpd.conf. So, we need to uncomment the lines describing the location of the srm.conf and access.conf files in your Apache installation. Doing this has no effect on Apache since they are empty (by default) anyway. You need to change these lines:
        #ResourceConfig conf/srm.conf
        #AccessConfig conf/access.conf
    
    to look like this:
        ResourceConfig /www/conf/srm.conf
        AccessConfig /www/conf/access.conf
    
    Make sure to put the full path!

Installing Front Page Extensions

  1. We are going to install using the script we downloaded above. The instructions in this section step you through the script.
        cd /usr/local/download
        chmod +x fp_install.sh
        ./fp_install.sh
    
    I had a problem doing this once where the fp_install.sh had been saved with MS-DOS style end of lines. I kept getting an error saying "File not Found" I think because the /bin/sh line at the start of this script looked like /bin/sh^M. To correct this problem you may need to remove the DOS end of line characters from the file. I did this in VIM with the following command:
        :%s/^M//g
    
    You can make the ^M appear by pressing ctrl-V and then ctrl-M.

  2. You should back up all of your web pages and configuration file before continuing. With my Apache setup this is a simple matter of doing:
        cd /www
        tar czf www.tgz conf servers
    
    This creates an archive called www.tgz which contains all of your web pages and configuration files for Apache and PHP.

  3. Now we can truthfully answer yes that we have created the necessary backups.

  4. Make your default installation path be:
        /usr/local/etc/frontpage
    
    so it sits nicely with our httpd and php installations. The script will automatically create a link to this location from /usr/local/frontpage.

  5. Your zcat that can uncompress gzip files is located at:
        /bin/zcat
    

  6. We are going to use virtual webs with front page so you do not need to create a root web.

  7. You also don't need to create sub or per user webs.

  8. We are going to create virtual webs, so answer yes.

  9. Your server config file should be located at:
        /www/conf/httpd.conf
    

  10. The install script should now give you a listing of all your virtual domains. You can set up each one independently with FrontPage extensions. For these instructions I will pretend to set up mysite.com. Enter the number of the virtual web you are setting up.

  11. Make the owner of the virtual web be your preferred unix user. I often like to create a user with the same name as the site to maintain their files etc. You can do this first in another box with the commands:
        adduser mysite
        passwd mysite mypass
    
    This creates a new user called:
        mysite
    
    with the password:
        mypass
    

  12. All users on my system that use the web files are part of the web group. You can create this group with:
        /usr/sbin/groupadd web
    
    Now we need to make sure that all the users are part of this group and that it is their default group. This helps since whenever they create a new file it will be owned by the group so others can edit it. Do this for each user:
        /usr/sbin/usermod -g web -G web mysite
    

  13. So now we can specify the owner of the virtual web:
        mysite
    

  14. And the unix group:
        web
    

  15. You can enter any name for your front page administrator. I used:
        fpadmin
    

  16. We are using server number 2, apache.

  17. Enter and confirm the password you want to use for fpadmin.

  18. Now we need to choose our character encoding. For me that is:
        1. LATIN1 (ISO 8859-1)
    

  19. Choose your prefered language.

  20. I didn't want to install per user or sub webs for this virtual domain.

  21. When you've done all the virtual webs you need, press Control-D to exit.

Installing mod_frontpage

  1. Unpack the module into the apache directory:
        tar xzf mod_frontpage-VR4.tar.gz -C ../etc/httpd
    

  2. We need to patch the Apache install to work with mod_frontpage:
        cd /usr/local/etc/httpd
        patch -p0 < src/modules/frontpage/apache_1.3.9-VR.patch
    

  3. Now some of the settings in the file:
        /usr/local/etc/httpd/src/modules/frontpage/fpexec.h
    
    need to be configured for our installation. Our cgi log file needs to be specified by changing line 98 from:
        #define LOGEXEC "/usr/local/apache/logs/cgi.log"
    
    to:
        #define LOGEXEC "/usr/local/etc/httpd/logs/cgi.log"
    
    We also need to tell Apache where it can find the FrontPage server executables. To do this, change line 114 from:
        #define FPDIR "/usr/local/frontpage/currentversion/exes"
    
    to:
        #define FPDIR "/usr/local/etc/frontpage/version4.0/exes"
    

  4. Now we need to configure Apache to include the frontpage module. We'll just use your previous configure command with frontpage added:
        cd /usr/local/etc/httpd
        ./config.status --activate-module=src/modules/frontpage/mod_frontpage.o
    

  5. If I run make now I get an error from mod_frontpage saying:
        target file clean has both : and :: entries
    
    You can try running make to see if you get the error, it does no harm. If you get the error then we can fix it by editing the mod_frontpage Makefile located at:
        /usr/local/etc/httpd/src/modules/frontpage/Makefile
    
    You need to comment out these two lines (at about line 97):
        clean::
                rm -f fpexec.o fpexec
    
    to be:
        #clean::
        #       rm -f fpexec.o fpexec
    

  6. Make and install Apache with Frontpage enabled
        make
    

  7. We need to stop the server before installing the files:
        bin/apachectl stop
    

  8. Now we can install the new binaries:
        make install
    

  9. Start apache again (now running the new frontpage enabled version):
        bin/apachectl start
    

  10. Now copy the frontpage binary into the Apache binaries directory. We need to give it the proper permissions and make it setuid root:
        install -o root -g root -m 4711 src/modules/frontpage/fpexec /usr/local/etc/httpd/bin
    

  11. The Frontpage module makes the FrontpageEnable and FrontpageDisable directives available. You need to set one of these directives in each of the Virtual Host definitions in your httpd.conf. Here is my configuration for mysite.com which uses Frontpage and mysite.org which does not:
    NameVirtualHost 192.168.6.1
    <VirtualHost 192.168.6.1>
        ServerAdmin webmaster@mysite.com
        DocumentRoot /www/servers/mysite.com
        ServerName mysite.com
        ServerAlias www.mysite.com
        ErrorLog /www/logs/mysite.com/error-log
        CustomLog /www/logs/mysite.com/access-log combined
        FrontpageEnable
        ScriptAlias /_vti_bin/_vti_adm/ /www/servers/mysite.com/_vti_bin/_vti_adm/ 
        ScriptAlias /_vti_bin/_vti_aut/ /www/servers/mysite.com/_vti_bin/_vti_aut/ 
        ScriptAlias /_vti_bin/ /www/servers/mysite.com/_vti_bin/ 
    </VirtualHost>
    
    <VirtualHost 192.168.6.1>
        ServerAdmin webmaster@mysite.org
        DocumentRoot /www/servers/mysite.org
        ServerName mysite.org
        ServerAlias www.mysite.org
        ErrorLog /www/logs/mysite.org/error-log
        CustomLog /www/logs/mysite.org/access-log combined
        FrontpageDisable
    </VirtualHost>
    

Testing the Installation

  1. We need to restart Apache for the changes to take effect:
        /usr/local/etc/httpd/bin/apachectl restart
    

  2. You can now connect using Frontpage. You need to open a new web giving it the URL of your site, mysite.com above.

  3. The user name and password to access the site are those you entered above for:
        fpadmin