diff options
Diffstat (limited to 'usr.sbin/httpd/htdocs')
-rw-r--r-- | usr.sbin/httpd/htdocs/manual/install-tpf.html | 276 | ||||
-rw-r--r-- | usr.sbin/httpd/htdocs/manual/suexec_1_2.html | 203 |
2 files changed, 479 insertions, 0 deletions
diff --git a/usr.sbin/httpd/htdocs/manual/install-tpf.html b/usr.sbin/httpd/htdocs/manual/install-tpf.html new file mode 100644 index 00000000000..a55636e5bec --- /dev/null +++ b/usr.sbin/httpd/htdocs/manual/install-tpf.html @@ -0,0 +1,276 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> +<HTML> +<HEAD> +<TITLE>Installing Apache on TPF</TITLE> +</HEAD> + +<BODY> +<H1 ALIGN="center"> + <A NAME="top">Installing the Apache 1.3 HTTP Server on TPF</A> +</H1> +<HR> +<CENTER>[ <A HREF="#setup">Setup</A> + | <A HREF="#compilation">Compilation</A> + | <A HREF="#installation">Installation</A> + | <A HREF="#visualage">VisualAge</A> ] +</CENTER> +<HR> +<BR> + +<P> +This document outlines the steps needed to install Apache onto a TPF system. +</P> +<P> +You should first read +htdocs/manual/<A HREF="readme-tpf.html">readme-tpf.html</A> +for basic information on the port of Apache to TPF including required PUT level +and supported functions & modules. +</P> + +<H2 align=center><A NAME="setup">Setup</A></H2> +<P> +Due to the use of EBCDIC on MVS OS/390 Open Edition +(later referred to simply as +"Open Edition"), we've found that the most reliable +method for loading Apache onto your system is to unzip and tar the distribution +file on your PC, and then copy the extracted files to Open Edition +via an NFS client +capable of transferring the data in EBCDIC format. +</P> +<P> +Before moving the distribution to an +Open Edition environment, verify that the NFS drive will transfer the +filenames with upper/lower case preserved. +</P> +<P> +Since Open Edition is not the ultimate destination of the files, +the only required files and subdirectories that need to be moved to +Open Edition +are in /src. +</P> +<P> +<FONT COLOR=red><STRONG>WARNING</STRONG></FONT>: +If you are using a product such as WinZip on your PC, verify that +the <EM>"TAR File Smart CR/LF Conversion"</EM> option is NOT checked. +You can find this in WinZip under Options, Configuration. +Since you had to tar and unzip the file to read this document, +you need to re-tar and -unzip if the CR/LF option was checked. +This will save you lots of headaches later on. +</P> +<P> +<FONT COLOR=red><STRONG>WARNING</STRONG></FONT>: +Editing files on a PC before moving them to Open Edition may result +in the loss/addition of unprintable characters. Files of concern include shell +scripts and src/Configuration. The most common problems are with +tab characters +and CR/LF characters. Most editors will handle the CR/LF problem correctly +but none seem to handle tab characters. If you need to edit files, edit them +in a UNIX editor such as vi or emacs. +</P> + +<H2 align=center><A NAME="compilation">Compilation</A></H2> +<P> +Apache supports the notion of "optional modules". However, +the server has to know which modules are compiled into it. In order for +those modules to be effective, it is necessary to generate a short bit of +code ("modules.c") which simply has a list of them. If you are using the +make and Configure utility, "modules.c" will be created for you. +</P> +<P> +The provided scripts assume a c89 compiler and have only been tested on an +Open Edition environment. If you are using a platform other that +Open Edition you may need to modify src/os/tpf/TPFExport and src/Configure +to match your environment. +</P> +<P> +Note that UNIX/Open Edition commands in this section are shown in +<TT><STRONG>bold</STRONG></TT>, +are case sensitive, and must be made from the "src" directory. +</P> +<OL> +<LI>Overlay src/Configuration with src/Configuration.tmpl: + <TT><STRONG>cp Configuration.tmpl Configuration</STRONG></TT> + <BR><BR> +<LI>Edit src/Configuration. It contains the list and settings + of various "Rules" and an additional section at the bottom that determines + which modules to compile: + <BR><BR> + <OL type=a> + <LI>Adjust the Rules and <TT>EXTRA_CFLAGS|LIBS|LDFLAGS|INCLUDES</TT> + if you feel so inclined. + <BR><BR> + <LI>Comment out (by preceding the line with a "#") lines corresponding + to those modules you DO NOT wish to include. + At present the following modules MUST be commented out + as they are not yet supported on TPF: mod_actions, mod_auth, + mod_cgi, mod_env, mod_include, & mod_status. + <BR><BR> + <LI>Uncomment (by removing the initial "#", if present) lines + corresponding to those optional modules you wish + to include or add new lines corresponding to any custom modules + you have written. + The htdocs/manual/<A HREF="readme-tpf.html">readme-tpf.html</A> + document lists the modules that have been tested on TPF. + </OL> + <BR> +<LI>Set the TPF environment variables: + <TT><STRONG>. os/tpf/TPFExport</STRONG></TT> + <BR> + (The initial period and blank on the command are required to ensure + the environment variables exist beyond the scope of the shell script.) + This script will set the environment variables required to compile the + programs for TPF. Verify that the export variables are valid for your + installation, in particular, the system include file directories. The + system include files must reside on your Open Edition system in the + appropriate file structure similar to /usr/include and /usr/include/sys. + DO NOT modify the <TT>TPF=YES</TT> export variable. If this is + changed, the "Configure" script will not recognize TPF. + <BR><BR> +<LI>Run the "Configure" script: + <TT><STRONG>Configure</STRONG></TT> + <BR> + The output will look something like this... + <PRE> + Using config file: Configuration + Creating Makefile + + configured for TPF platform + + setting C compiler to c89 + + setting C pre-processor to c89 -E + + checking for system header files + + adding selected modules + Creating Makefile in support + Creating Makefile in main + Creating Makefile in ap + Creating Makefile in regex + Creating Makefile in os/tpf + Creating Makefile in modules/standard + Creating Makefile in modules/example + $ _ + </PRE> + This generates modules.c and new versions of the Makefiles. + <BR><BR> + If you want to maintain multiple configurations, you can + say, <EM>e.g.</EM>, + <BR> + <TT><STRONG>Configure -file Configuration.ai</STRONG></TT> + <BR> + <PRE> + Using config file: Configuration.ai + Creating Makefile + + configured for <whatever> platform + + setting C compiler to <whatever> + et cetera + </PRE> + + If you receive an error such as "<TT>Configure 146: FSUM7351 not found</TT>" + the most likely explanation is that one or more of the make related + files were edited on a non-UNIX platform, corrupting the end-of-line marks. + Verify that lines ending with "\" in the flagged file do not have trailing + spaces. Using the vi editor and the sample error above as an example... + <BR><BR><PRE> + pull up the flagged file: <STRONG>vi Configure</STRONG> + turn on punctuation: <STRONG>:set list</STRONG> + go to the line in question: <STRONG>146G</STRONG> + or find a line with a "\": <STRONG>/\\</STRONG></PRE> + The end of line should display as "<TT>\$</TT>". If it is displayed as + "<TT>\ $</TT>" (with a blank between \ and $) then you should revert to the + distributed version of the file and make the site-specific + changes again using a UNIX compatible editor such as vi or emacs. + Then try the Configure command again. + <BR><PRE> close the file: <STRONG>:q </STRONG>(or + +<STRONG>:quit!</STRONG>)</PRE> +<LI>Now compile the programs: <TT><STRONG>make</STRONG></TT><BR> + The modules placed in the Apache distribution are the ones that have been + tested and are used regularly by various members of the Apache development + group. Additional modules contributed by members or third parties with specific + needs or functions are available at + <A +HREF="http://www.apache.org/dist/contrib/modules/">http://www.apache.org/dist/contrib/modules/</A>. + There are instructions on that page for linking these modules into the core Apache + code. + <BR><BR> + If during compilation you get a warning about a missing 'regex.h', set + <TT>WANTHSREGEX=yes</TT> in the src/Configuration file and start back at the + <TT><STRONG>Configure</STRONG></TT> step. +</OL> + +<A NAME="installation"> </A> +<H2 align=center>Installation</H2> +<OL> +<LI>After compilation, you will have all the object files required to build an + "httpd" loadset. The next step is to link the object files and create a loadset to be + stored in a PDS. Sample JCL for linking and loadsets has been included in + src/os/tpf/samples as "linkdll.jcl" and "loadset.jcl". You can submit these jobs + from CMS or directly from Open Edition if you have the proper authority. After + the jobs have completed, you can <TT>ZOLDR LOAD</TT> them to your TPF system. + <BR><BR> + NOTE: The <TT>mod_<EM>xxx</EM>.o</TT> files in the linkdll.jcl file must correspond to the + <TT>mod_<EM>xxx</EM>.o</TT> lines in the src/Configuration file. + <BR><BR> +<LI> + Apache requires a configuration file to initialize itself during activation. + (Previously three configuration files were used.) + Copy the distribution version, /conf/httpd.conf-dist, to /conf/httpd.conf and then + edit the /conf/httpd.conf copy with your site specific information. This first release + of Apache for TPF only runs under the "inetd" model so you + <font color=red><STRONG>must</STRONG></FONT> change <TT>ServerType</TT> from <TT>standalone</TT> + to <TT>inetd</TT>. + <BR><BR> + General documentation for Apache is located at + <A HREF="http://www.apache.org/docs/">http://www.apache.org/docs/</A> + and in the HTML pages included with this distribution under the + /htdocs/manual directory. + <BR><BR> +<LI>On TPF activate ZCLAW and update INETD using ZINET entries, the common case: + <BR><BR> + <PRE> + ZINET ADD S-TFTP PGM-CTFT PORT-69 PROTOCOL-UDP MODEL-NOWAIT + ZINET ADD S-APACHE PGM-<EM>pppp</EM> PORT-80 PROTOCOL-TCP MODEL-NOWAIT</PRE> + Please refer to <EM>IBM Transaction Processing Facility Transmission Control + Protocol/Internet Protocol Version 4 Release 1</EM> for more information + on ZCLAW, INETD, and TFTP. + <BR><BR> +<LI>Prior to sending a request to your Apache server from a browser, + TFTP the configuration file, log, icons and web pages to your TPF system. + A typical directory structure for Apache is as follows: +<PRE> /usr/local/apache/conf + /usr/local/apache/logs + /usr/local/apache/icons + /usr/local/apache/htdocs</PRE> + The logs directory must exist in order to avoid an + <CODE>fopen</CODE> error while running Apache. TFTP an empty file into + the logs subdirectory to create it. All gif, jpg, and zip files should be + TFTP'd as binary; conf files and html pages should be TFTP'd as text. +</OL> +<A NAME="visualage"> </A> +<H2 align=center>Compiling with VisualAge TPF</H2> +<P> + It is not required that "make" be used to compile Apache for TPF: + Individual programs may be compiled using IBM's VisualAge TPF product. + This is particularly useful when compiling selected programs for the Debug Tool. + <BR><BR> + The following VisualAge compile settings are required: + <UL> + <LI><EM>"DEFINE - Define preprocessor macro name(s)"</EM> must include + <TT><STRONG>TPF, CHARSET_EBCDIC, _POSIX_SOURCE,</STRONG></TT> and + <TT><STRONG>USE_HSREGEX</STRONG></TT> + <BR><BR> + <LI><EM>"LSEARCH - Path for user include files"</EM> must include + <TT><STRONG>../src/include</STRONG></TT> and <TT><STRONG>../src/os/tpf</STRONG></TT> + <BR><BR> + <LI><EM>"DLL - Generate DLL code"</EM> must be checked + <BR><BR> + <LI><EM>"LONGNAME - Support long names"</EM> must be checked + </UL> +</P> +<HR> +<CENTER>[ <A HREF="#top">top</A> + | <A HREF="#setup">Setup</A> + | <A HREF="#compilation">Compilation</A> + | <A HREF="#installation">Installation</A> + | <A HREF="#visualage">VisualAge</A> ] +</CENTER> + +</BODY> +</HTML> diff --git a/usr.sbin/httpd/htdocs/manual/suexec_1_2.html b/usr.sbin/httpd/htdocs/manual/suexec_1_2.html new file mode 100644 index 00000000000..bcfc7252f2f --- /dev/null +++ b/usr.sbin/httpd/htdocs/manual/suexec_1_2.html @@ -0,0 +1,203 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> +<HTML> +<HEAD> +<TITLE>Apache suEXEC Support</TITLE> +</HEAD> +<!-- Background white, links blue (unvisited), navy (visited), red (active) --> +<BODY + BGCOLOR="#FFFFFF" + TEXT="#000000" + LINK="#0000FF" + VLINK="#000080" + ALINK="#FF0000" +> +<DIV ALIGN="CENTER"> + <IMG SRC="images/sub.gif" ALT="[APACHE DOCUMENTATION]"> + <H3> + Apache HTTP Server Version 1.3 + </H3> +</DIV> + + +<H3><A NAME="install">Configuring & Installing suEXEC</A></H3> +<P ALIGN="LEFT"> +This section describes the configuration and installation of +the suEXEC feature with the "<CODE>src/Configure</CODE>" script. +<BR> +(If you use Apache 1.3 you may want to use the Apache +AutoConf-style interface (APACI) which is described in the +<A HREF="suexec.html">main suEXEC document</A>). +</P> + +<P ALIGN="LEFT"> +<STRONG>EDITING THE SUEXEC HEADER FILE</STRONG><BR> +- From the top-level of the Apache source tree, type: +<STRONG><CODE>cd support [ENTER]</CODE></STRONG> +</P> + +<P ALIGN="LEFT"> +Edit the <CODE>suexec.h</CODE> file and change the following macros to +match your local Apache installation. +</P> + +<P ALIGN="LEFT"> +<EM>From support/suexec.h</EM> +<PRE> + /* + * HTTPD_USER -- Define as the username under which Apache normally + * runs. This is the only user allowed to execute + * this program. + */ + #define HTTPD_USER "www" + + /* + * UID_MIN -- Define this as the lowest UID allowed to be a target user + * for suEXEC. For most systems, 500 or 100 is common. + */ + #define UID_MIN 100 + + /* + * GID_MIN -- Define this as the lowest GID allowed to be a target group + * for suEXEC. For most systems, 100 is common. + */ + #define GID_MIN 100 + + /* + * USERDIR_SUFFIX -- Define to be the subdirectory under users' + * home directories where suEXEC access should + * be allowed. All executables under this directory + * will be executable by suEXEC as the user so + * they should be "safe" programs. If you are + * using a "simple" UserDir directive (ie. one + * without a "*" in it) this should be set to + * the same value. suEXEC will not work properly + * in cases where the UserDir directive points to + * a location that is not the same as the user's + * home directory as referenced in the passwd file. + * + * If you have VirtualHosts with a different + * UserDir for each, you will need to define them to + * all reside in one parent directory; then name that + * parent directory here. IF THIS IS NOT DEFINED + * PROPERLY, ~USERDIR CGI REQUESTS WILL NOT WORK! + * See the suEXEC documentation for more detailed + * information. + */ + #define USERDIR_SUFFIX "public_html" + + /* + * LOG_EXEC -- Define this as a filename if you want all suEXEC + * transactions and errors logged for auditing and + * debugging purposes. + */ + #define LOG_EXEC "/usr/local/apache/logs/cgi.log" /* Need me? */ + + /* + * DOC_ROOT -- Define as the DocumentRoot set for Apache. This + * will be the only hierarchy (aside from UserDirs) + * that can be used for suEXEC behavior. + */ + #define DOC_ROOT "/usr/local/apache/htdocs" + + /* + * SAFE_PATH -- Define a safe PATH environment to pass to CGI executables. + * + */ + #define SAFE_PATH "/usr/local/bin:/usr/bin:/bin" +</PRE> +</P> + +<P ALIGN="LEFT"> +<STRONG>COMPILING THE SUEXEC WRAPPER</STRONG><BR> +You now need to compile the suEXEC wrapper. At the shell command prompt, +after compiling Apache, +type: <STRONG><CODE>make suexec[ENTER]</CODE></STRONG>. +This should create the <STRONG><EM>suexec</EM></STRONG> wrapper executable. +</P> + +<P ALIGN="LEFT"> +<STRONG>COMPILING APACHE FOR USE WITH SUEXEC</STRONG><BR> +By default, Apache is compiled to look for the suEXEC wrapper in the following +location. +</P> + +<P ALIGN="LEFT"> +<EM>From src/include/httpd.h</EM> +<PRE> + /* The path to the suExec wrapper, can be overridden in Configuration */ + #ifndef SUEXEC_BIN + #define SUEXEC_BIN HTTPD_ROOT "/sbin/suexec" + #endif +</PRE> +</P> + +<P ALIGN="LEFT"> +If your installation requires location of the wrapper program in a different +directory, either add +<CODE>-DSUEXEC_BIN=\"<EM></your/path/to/suexec></EM>\"</CODE> +to your CFLAGS (or edit src/include/httpd.h) and recompile your Apache server. +See <A HREF="install.html">Compiling and Installing Apache</A> +(and the <SAMP>INSTALL</SAMP> file in the source distribution) +for more info on this process. +</P> + +<P ALIGN="LEFT"> +<STRONG>COPYING THE SUEXEC BINARY TO ITS PROPER LOCATION</STRONG><BR> +Copy the <STRONG><EM>suexec</EM></STRONG> executable created in the +exercise above to the defined location for <STRONG>SUEXEC_BIN</STRONG>. +</P> + +<P ALIGN="LEFT"> +<STRONG><CODE>cp suexec /usr/local/apache/sbin/suexec [ENTER]</CODE></STRONG> +</P> + +<P ALIGN="LEFT"> +In order for the wrapper to set the user ID, it must be installed as owner +<STRONG><EM>root</EM></STRONG> and must have the setuserid execution bit +set for file modes. If you are not running a <STRONG><EM>root</EM></STRONG> +user shell, do so now and execute the following commands. +</P> + +<P ALIGN="LEFT"> +<STRONG><CODE>chown root /usr/local/apache/sbin/suexec [ENTER]</CODE></STRONG> +<BR> +<STRONG><CODE>chmod 4711 /usr/local/apache/sbin/suexec [ENTER]</CODE></STRONG> +</P> + +<H3><A NAME="enable">Enabling & Disabling suEXEC</A></H3> +<P ALIGN="LEFT"> +After properly installing the <STRONG>suexec</STRONG> wrapper +executable, you must kill and restart the Apache server. A simple +<STRONG><CODE>kill -1 `cat httpd.pid`</CODE></STRONG> will not be enough. +Upon startup of the web-server, if Apache finds a properly configured +<STRONG>suexec</STRONG> wrapper, it will print the following message to +the console (Apache 1.2): +<PRE> + Configuring Apache for use with suexec wrapper. +</PRE> +If you use Apache 1.3 the following message is printed to the +error log: +<PRE> + [notice] suEXEC mechanism enabled (wrapper: <EM>/path/to/suexec</EM>) +</PRE> +</P> +<P ALIGN="LEFT"> +If you don't see this message at server startup, the server is most +likely not finding the wrapper program where it expects it, or the +executable is not installed <STRONG><EM>setuid root</EM></STRONG>. Check +your installation and try again. +</P> + +<P ALIGN="CENTER"> +<STRONG><A HREF="suexec.html">BACK TO MAIN PAGE</A></STRONG> +</P> + +<HR> + <H3 ALIGN="CENTER"> + Apache HTTP Server Version 1.3 + </H3> + +<A HREF="./"><IMG SRC="images/index.gif" ALT="Index"></A> + +</BODY> +</HTML> |