PACC web administration

Mark Tuttle

December 1, 2008

This document serves two purposes.  The initial portion of the document is intended to be an introduction and user guide for church members who would like to help maintain web pages and other content on the church web site.  The remainder of the document is intended to be documentation of more technical topics for church members who need to know how to configure and maintain the web site and web server itself.  This document is a work in progress, please feel free to send comments or contributions.

Web content

To edit web pages on our web site, you need two things: 

  1. An editor for web pages.  For simple editing, the Firefox web browser is supposed to be good, although I haven’t used it.  For complex tasks, two slightly antiquated editors are Microsoft Frontpage and Adobe Dreamweaver, and the modern editor from Microsoft is Web Expressions.   You may find that these tools have a steep learning curve, but the one thing they do well is maintain the links from one page to another.  If you rename a web page, these programs will find every link to that web page and modify the link to point to the renamed page.  Doing this by hand can be a real headache.

  2. An ftp client to move files back and forth between your computer and the web server.  For now, we assume your local machine is a windows machine, and we insist that you use the winscp client.  It is a free client, we know it works, we can provide instructions on how to use it, and it would be a real headache to debug problems encountered with or caused by a half dozen different ftp clients.  If your local machine is a linux or macintosh machine, or you really want to use a different windows ftp client, contact me so we can work out procedures and configuration together.

So now, let’s get started.  Here is the current draft of our winscp documentation telling you how to install, configure, and use winscp with our web site.

Web site administration

  1. Nick Dokos wrote a fairly complete document on how to administer the church web site in 2004.  This document was fairly sophisticated proposal for how we could maintain the web site hosted on a web server run by Rob Adams.  Rob did us the great favor of maintaining that server for many years after he left the church when his family moved out of state.  We moved the web site to a commercial web hosting company called ICDSoft in 2007, so Nick’s document no longer applies directly to our web site, but it does a good job of explaining concepts like what a web server, how the scripts on our web site work, and what htaccess files are.

  2. The htaccess files on our web site control access to restricted sections of the web site, and ensure scripts on the web site run correctly.  Here here is the content of the htaccess files on our web site as of December 2008.

    1. htaccess file in the top level directory /www/www

    2. htaccess file in the email directory /www/www/email

    3. htaccess file in the admin directory /www/www/admin

  3. The email lists can be maintained via the email administration web page.  This is restricted, you need a password.

  4. We use svn to maintain backups and do version control of the web site.  The svn repository currently lives on Mark’s laptop.

  5. Each person with permission to modify web pages is given a unique userid and password.  Here is the procedure to give a new person access to web pages

    1. Use the control panel to create the userid/password pair for web site ftp access.  As part of this process, you must choose the subtree of the website to which this person has access.  Generally speaking, members of the web team get access to the entire web site, and others get access only the subtree they volunteer to maintain.  The idea is that members of the web team should be able to make updates to any section in the case the person owning that section is out of town, etc; and owners of a section are restricted to that section, not because we don’t trust them, but because this makes it easy to contain accidental or catastrophic mistakes.

    2. Use htpasswd to create the userid/password pair for web site http access.  Use the winscp editor to add the userid/password to /private/htpasswd.

    3. Use the winscp editor to add the userid to the appropriate groups in /private/htgroups.  This probably means the web and/or email group.

Here are a few notes on the process of converting a web site from frontpage to winscp/svn.

  1. Create a repository with svnadmin create /path/svn

  2. Burn a dvd with the SITE frontpage data.  Rename the folder with the frontpage data from SITE to SITE-frontpage.

  3. Create a folder SITE to hold the web server data

  4. Import the empty folder into the repository with svn import SITE file:///path/svn/SITE

  5. Delete empty folder SITE

  6. Checkout the empty repository with svn checkout file:///path/svn/SITE

  7. Use winscp to copy the web server data into the folder using synchronization, and get everything including .htaccess files but don’t wipe out local .svn.

  8. Verify that everything is okay by doing a synchronize to both the local and remote folders

  9. Use find to find all .htaccess files and copy them into an admin folder

  10. Copy the frontpage cleanup make file into SITE, and run it to clean up the folder

  11. Add the new data to the repository with svn add *

  12. Verify everything is okay by doing an svn status on the local folder

  13. Turn off frontpage extensions on the web server (this will remove the htaccess files on the server)

  14. Verify that everything is okay by doing a synchronize to both the local and remote folders, and doing an svn status on the local folder

  15. Buy yourself a nice dinner to celebrate.