Hi Michiel,

here it is. Put it on your website, if you want to.

One question: I run php4 directly - without phpstub - as described in 
the guide. Could this lead to problems? It seem to return the correct 
headers. A "php4 < phptest.php" returned:

        X-Powered-By: PHP/4.1.2
        Content-type: text/html

        <html>
        <body>
        46 mal
        </body>
        </html>


Karsten
mathopd Quick-Start-Guide
=========================

Author: Karsten Priegnitz, [EMAIL PROTECTED]
Date:   15.01.2002


DISCLAIMER
==========

USE THIS GUIDE AT YOUR OWN RISK.



Introduction
============

This is a step by step guide to setup mathopd (v. 1.3pl7) with php4
support on a linux box. Please do _everything_ as described here. If
you want to change paths, rights or other things, do this after
completing the following steps!



Contents
========


1    Installing php4

2    Setting up mathopd

2.1  Installation

2.2  A basic configuration file

2.3  Where the files lie...

2.4  Starting and stopping mathopd




1    Installing php4


  I tested mathopd with php4 support on a debian woody box. On a Debian
  system, decide which package to use: php4 (which will install apache
  too) or php4-cgi. Both will handle the calls made by mathopd
  correctly.

  Depending on your distribution decide which packages fit your needs
  best.

  If you decide to download php4 from www.php.net then ignore the
  webserver-specific parameters for ./configure. Just check the
  chapter "Quick Install" in the file INSTALL.




2    Setting up mathopd



2.1  Installation


  Download mathopd and extract it. In the directory you extracted it to,
  do a

    make && make install

  to have it compiled and installed to /usr/local/sbin.



2.2  A basic configuration file


  Now you need a basic configuration file. Save the following to
  /etc/mathopd.conf:


    # MATHOPD-CONFIG

    Umask 026

    Tuning {
            NumConnections 120
            BufSize 12288
    }

    User daemon
    StayRoot Off

    PIDFile /tmp/mathopd.pid
    Log /tmp/mathopd.log.%Y%m%d
    ErrorLog /tmp/mathopd.errors.%Y%m

    Control {
        Symlinks On
        Types {
            text/plain { * }
            text/css { css }
            application/octet-stream { zip rar bz2 gz tgz exe class }
            application/futuresplash { spl }
            model/vrml { wrl }
            application/pdf { pdf }
            text/html { html htm }
            image/gif { gif }
            image/jpeg { jpg }
            image/png { png }
        }
        Specials {
            Imagemap { map }
            CGI { cgi }
            Redirect { url }
        }
        External {
            /usr/bin/perl { pl }
        }
        External {
            # redirect php's to php4 directly
            /usr/bin/php4 { php php3 php4 }
        }
        IndexNames { index.html home.html index.htm redirect.url }
    }

    DefaultName localhost

    Server {
        Port 80

        # configuration for access from the LAN
        # to be able to use the server's hostname only
        # (eg. http://koem)
        Virtual {
            # put your server's hostname here
            Host koem
            Control {
                Alias /
                # path where websites reside
                Location /usr/local/htdocs
            }
        }

        # configuration for acces from the internet
        Virtual {
            # put your servers full name here (eg. www.hallo.de)
            Host koem.homelinux.net
            Control {
                Alias /
                # path where websites reside
                Location /usr/local/htdocs
            }
        }
    }

    # END-MATHOPD-CONFIG


  Please change the php4-path if necessary and put _your_ hostnames in
  the "Server" chapters.

  If you need further information for the config file refer to

    http://www.mathopd.org/sample.cfg.txt

  and

    http://www.mathopd.org/config.txt



2.3  Where the files lie...


  As can be seen in the config file, the files to be delivered by
  mathopd (your website) reside in /usr/local/htdocs and the user who
  runs mathopd is named daemon.

  Create the /usr/local/htdocs directory and make it readable and
  accessible for the user daemon (eg. chmod o+rx /usr/local/htdocs).
  Now put your files inside the directory and make them be owned by
  daemon (chown -R daemon /usr/local/htdocs/*) and give the appropriate
  rights (eg.chmod -R u+rwx /usr/local/htdocs/*).



2.4  Starting and stopping mathopd


  Now start mathopd with

    mathopd < /etc/mathopd.conf &

  and test your installation. If you encounter problems, then check the
  log files /tmp/mathopd.log.* and /tmp/mathopd.errors.*


  To stop mathopd use something like this:

    kill `cat /tmp/mathopd.pid`; rm /tmp/mathopd.pid

Reply via email to