diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2000-12-15 22:18:43 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2000-12-15 22:18:43 +0000 |
commit | 9b753ad9abb60197bbaeec8b1df78d1dffa531c8 (patch) | |
tree | 8f2f79b84e303efda0f0c4121f4b9d5532eb0a73 | |
parent | eac93d7ea2b0be162ac7484c51dac808cc2493f0 (diff) |
import apache 1.3.26 + mod_ssl 2.8.10
42 files changed, 5879 insertions, 0 deletions
diff --git a/usr.sbin/httpd/conf/httpd.conf-dist-nw b/usr.sbin/httpd/conf/httpd.conf-dist-nw new file mode 100644 index 00000000000..4d8cdb5894f --- /dev/null +++ b/usr.sbin/httpd/conf/httpd.conf-dist-nw @@ -0,0 +1,917 @@ +# +# Based upon the NCSA server configuration files originally by Rob McCool. +# +# This is the main Apache server configuration file. It contains the +# configuration directives that give the server its instructions. +# See <URL:http://www.apache.org/docs/> for detailed information about +# the directives. +# +# Do NOT simply read the instructions in here without understanding +# what they do. They're here only as hints or reminders. If you are unsure +# consult the online docs. You have been warned. +# +# After this file is processed, the server will look for and process +# sys:/apache/conf/srm.conf and then sys:/apache/conf/access.conf +# unless you have overridden these with ResourceConfig and/or +# AccessConfig directives here. +# +# The configuration directives are grouped into three basic sections: +# 1. Directives that control the operation of the Apache server process as a +# whole (the 'global environment'). +# 2. Directives that define the parameters of the 'main' or 'default' server, +# which responds to requests that aren't handled by a virtual host. +# These directives also provide default values for the settings +# of all virtual hosts. +# 3. Settings for virtual hosts, which allow Web requests to be sent to +# different IP addresses or hostnames and have them handled by the +# same Apache server process. +# +# Configuration and logfile names: If the filenames you specify for many +# of the server's control files begin with "/" (or "drive:/" for Win32 and +# sys:/ for NetWare), the server will use that explicit path. If the +# filenames do *not* begin with "/", the value of ServerRoot is prepended +# -- so "logs/foo.log" with ServerRoot set to "/usr/local/apache" will be +# interpreted by the server as "/usr/local/apache/logs/foo.log". +# + +### Section 1: Global Environment +# +# The directives in this section affect the overall operation of Apache, +# such as the number of concurrent requests it can handle or where it +# can find its configuration files. +# + +# +# ServerType is either inetd, or standalone. Inetd mode is only supported on +# Unix platforms. +# +ServerType standalone + +# +# ServerRoot: The top of the directory tree under which the server's +# configuration, error, and log files are kept. +# +# NOTE! If you intend to place this on an NFS (or otherwise network) +# mounted filesystem then please read the LockFile documentation +# (available at <URL:http://www.apache.org/docs/mod/core.html#lockfile>); +# you will save yourself a lot of trouble. +# +# Do NOT add a slash at the end of the directory path. +# +ServerRoot "sys:/apache" + +# +# PidFile: The file in which the server should record its process +# identification number when it starts. +# +PidFile logs/httpd.pid + +# +# ScoreBoardFile: File used to store internal server process information. +# Not all architectures require this. But if yours does (you'll know because +# this file will be created when you run Apache) then you *must* ensure that +# no two invocations of Apache share the same scoreboard file. +# +ScoreBoardFile logs/apache_status + +# +# In the standard configuration, the server will process this file, +# srm.conf, and access.conf in that order. The latter two files are +# now distributed empty, as it is recommended that all directives +# be kept in a single file for simplicity. The commented-out values +# below are the built-in defaults. You can have the server ignore +# these files altogether by using "/dev/null" (for Unix) or +# "nul" (for Win32) for the arguments to the directives. +# +#ResourceConfig conf/srm.conf +#AccessConfig conf/access.conf + +# +# Timeout: The number of seconds before receives and sends time out. +# +Timeout 300 + +# +# KeepAlive: Whether or not to allow persistent connections (more than +# one request per connection). Set to "Off" to deactivate. +# +KeepAlive On + +# +# MaxKeepAliveRequests: The maximum number of requests to allow +# during a persistent connection. Set to 0 to allow an unlimited amount. +# We recommend you leave this number high, for maximum performance. +# +MaxKeepAliveRequests 100 + +# +# KeepAliveTimeout: Number of seconds to wait for the next request from the +# same client on the same connection. +# +KeepAliveTimeout 15 + +# +# Number of concurrent threads (i.e., requests) the server will allow. +# Set this value according to the responsiveness of the server (more +# requests active at once means they're all handled more slowly) and +# the amount of system resources you'll allow the server to consume. +# +ThreadsPerChild 50 + +# +# When NetWare creates a thread you need to specify the stack size. +# You may need to increase this if you get stack overflows. +# ThreadStackSize 65536 + +ThreadStackSize 65536 + +# +# MaxRequestsPerChild: the number of requests each child process is +# allowed to process before the child dies. The child will exit so +# as to avoid problems after prolonged use when Apache (and maybe the +# libraries it uses) leak memory or other resources. On most systems, this +# isn't really needed, but a few (such as Solaris) do have notable leaks +# in the libraries. For these platforms, set to something like 10000 +# or so; a setting of 0 means unlimited. +# +# NOTE: This value does not include keepalive requests after the initial +# request per connection. For example, if a child process handles +# an initial request and 10 subsequent "keptalive" requests, it +# would only count as 1 request towards this limit. +# +MaxRequestsPerChild 0 + +# +# Listen: Allows you to bind Apache to specific IP addresses and/or +# ports, in addition to the default. See also the <VirtualHost> +# directive. +# +#Listen 3000 +#Listen 12.34.56.78:80 + + +# +# BindAddress: You can support virtual hosts with this option. This directive +# is used to tell the server which IP address to listen to. It can either +# contain "*", an IP address, or a fully qualified Internet domain name. +# See also the <VirtualHost> and Listen directives. +# +#BindAddress * + +# +# Dynamic Shared Object (DSO) Support +# +# To be able to use the functionality of a module which was built as a DSO you +# have to place corresponding `LoadModule' lines at this location so the +# directives contained in it are actually available _before_ they are used. +# Please read the file README.DSO in the Apache 1.3 distribution for more +# details about the DSO mechanism and run `httpd -l' for the list of already +# built-in (statically linked and thus always available) modules in your httpd +# binary. +# +# Note: The order is which modules are loaded is important. Don't change +# the order below without expert advice. + +# LoadModule anon_auth_module modules/authanon.nlm +# LoadModule cern_meta_module modules/cernmeta.nlm +# LoadModule digest_module modules/digest.nlm +# LoadModule expires_module modules/expires.nlm +# LoadModule headers_module modules/headers.nlm +# LoadModule proxy_module modules/proxy.nlm +# LoadModule rewrite_module modules/rewrite.nlm +# LoadModule speling_module modules/speling.nlm +# LoadModule status_module modules/status.nlm +# LoadModule info_module modules/info.nlm +# LoadModule usertrack_module modules/usrtrack.nlm +# LoadModule tls_module modules/mod_tls.nlm + +# +# ExtendedStatus controls whether Apache will generate "full" status +# information (ExtendedStatus On) or just basic information (ExtendedStatus +# Off) when the "server-status" handler is called. The default is Off. +# +#ExtendedStatus On + +### Section 2: 'Main' server configuration +# +# The directives in this section set up the values used by the 'main' +# server, which responds to any requests that aren't handled by a +# <VirtualHost> definition. These values also provide defaults for +# any <VirtualHost> containers you may define later in the file. +# +# All of these directives may appear inside <VirtualHost> containers, +# in which case these default settings will be overridden for the +# virtual host being defined. +# + +# +# Port: The port to which the standalone server listens. For +# ports < 1023, you will need httpd to be run as root initially. +# +Port 80 + +# +# ServerAdmin: Your address, where problems with the server should be +# e-mailed. This address appears on some server-generated pages, such +# as error documents. +# +ServerAdmin someone@somewhere.com + +# +# ServerName allows you to set a host name which is sent back to clients for +# your server if it's different than the one the program would get (i.e., use +# "www" instead of the host's real name). +# +# Note: You cannot just invent host names and hope they work. The name you +# define here must be a valid DNS name for your host. If you don't understand +# this, ask your network administrator. +# If your host doesn't have a registered DNS name, enter its IP address here. +# You will have to access it by its address (e.g., http://123.45.67.89/) +# anyway, and this will make redirections work in a sensible way. +# +ServerName 123.45.67.89 + +# +# DocumentRoot: The directory out of which you will serve your +# documents. By default, all requests are taken from this directory, but +# symbolic links and aliases may be used to point to other locations. +# +DocumentRoot "sys:/apache/htdocs" + +# +# Each directory to which Apache has access, can be configured with respect +# to which services and features are allowed and/or disabled in that +# directory (and its subdirectories). +# +# First, we configure the "default" to be a very restrictive set of +# permissions. +# +<Directory /> + Options FollowSymLinks + AllowOverride None +</Directory> + +# +# Note that from this point forward you must specifically allow +# particular features to be enabled - so if something's not working as +# you might expect, make sure that you have specifically enabled it +# below. +# + +# +# This should be changed to whatever you set DocumentRoot to. +# +<Directory "sys:/apache/htdocs"> +# +# This may also be "None", "All", or any combination of "Indexes", +# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews". +# +# Note that "MultiViews" must be named *explicitly* --- "Options All" +# doesn't give it to you. +# + Options Indexes FollowSymLinks MultiViews + +# +# This controls which options the .htaccess files in directories can +# override. Can also be "All", or any combination of "Options", "FileInfo", +# "AuthConfig", and "Limit" +# + AllowOverride None + +# +# Controls who can get stuff from this server. +# + Order allow,deny + Allow from all +</Directory> + +# +# UserDir: The name of the directory which is appended onto a user's home +# directory if a ~user request is received. +# +<IfModule mod_userdir.c> + UserDir public_html +</IfModule> + +# +# Control access to UserDir directories. The following is an example +# for a site where these directories are restricted to read-only. +# +#<Directory /home/*/public_html> +# AllowOverride FileInfo AuthConfig Limit +# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec +# <Limit GET POST OPTIONS PROPFIND> +# Order allow,deny +# Allow from all +# </Limit> +# <LimitExcept GET POST OPTIONS PROPFIND> +# Order deny,allow +# Deny from all +# </LimitExcept> +#</Directory> + +# +# DirectoryIndex: Name of the file or files to use as a pre-written HTML +# directory index. Separate multiple entries with spaces. +# +<IfModule mod_dir.c> + DirectoryIndex index.html +</IfModule> + +# +# AccessFileName: The name of the file to look for in each directory +# for access control information. +# +AccessFileName .htaccess + +# +# The following lines prevent .htaccess files from being viewed by +# Web clients. Since .htaccess files often contain authorization +# information, access is disallowed for security reasons. Comment +# these lines out if you want Web visitors to see the contents of +# .htaccess files. If you change the AccessFileName directive above, +# be sure to make the corresponding changes here. +# +# Also, folks tend to use names such as .htpasswd for password +# files, so this will protect those as well. +# +<Files ~ "^\.ht"> + Order allow,deny + Deny from all +</Files> + +# +# CacheNegotiatedDocs: By default, Apache sends "Pragma: no-cache" with each +# document that was negotiated on the basis of content. This asks proxy +# servers not to cache the document. Uncommenting the following line disables +# this behavior, and proxies will be allowed to cache the documents. +# +#CacheNegotiatedDocs + +# +# UseCanonicalName: (new for 1.3) With this setting turned on, whenever +# Apache needs to construct a self-referencing URL (a URL that refers back +# to the server the response is coming from) it will use ServerName and +# Port to form a "canonical" name. With this setting off, Apache will +# use the hostname:port that the client supplied, when possible. This +# also affects SERVER_NAME and SERVER_PORT in CGI scripts. +# +UseCanonicalName On + +# +# TypesConfig describes where the mime.types file (or equivalent) is +# to be found. +# +<IfModule mod_mime.c> + TypesConfig conf/mime.types +</IfModule> + +# +# DefaultType is the default MIME type the server will use for a document +# if it cannot otherwise determine one, such as from filename extensions. +# If your server contains mostly text or HTML documents, "text/plain" is +# a good value. If most of your content is binary, such as applications +# or images, you may want to use "application/octet-stream" instead to +# keep browsers from trying to display binary files as though they are +# text. +# +DefaultType text/plain + +# +# The mod_mime_magic module allows the server to use various hints from the +# contents of the file itself to determine its type. The MIMEMagicFile +# directive tells the module where the hint definitions are located. +# mod_mime_magic is not part of the default server (you have to add +# it yourself with a LoadModule [see the DSO paragraph in the 'Global +# Environment' section], or recompile the server and include mod_mime_magic +# as part of the configuration), so it's enclosed in an <IfModule> container. +# This means that the MIMEMagicFile directive will only be processed if the +# module is part of the server. +# +<IfModule mod_mime_magic.c> + MIMEMagicFile conf/magic +</IfModule> + +# +# HostnameLookups: Log the names of clients or just their IP addresses +# e.g., www.apache.org (on) or 204.62.129.132 (off). +# The default is off because it'd be overall better for the net if people +# had to knowingly turn this feature on, since enabling it means that +# each client request will result in AT LEAST one lookup request to the +# nameserver. +# +HostnameLookups Off + +# +# ErrorLog: The location of the error log file. +# If you do not specify an ErrorLog directive within a <VirtualHost> +# container, error messages relating to that virtual host will be +# logged here. If you *do* define an error logfile for a <VirtualHost> +# container, that host's errors will be logged there and not here. +# +ErrorLog logs/error_log + +# +# LogLevel: Control the number of messages logged to the error_log. +# Possible values include: debug, info, notice, warn, error, crit, +# alert, emerg. +# +LogLevel warn + +# +# The following directives define some format nicknames for use with +# a CustomLog directive (see below). +# +LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined +LogFormat "%h %l %u %t \"%r\" %>s %b" common +LogFormat "%{Referer}i -> %U" referer +LogFormat "%{User-agent}i" agent + +# +# The location and format of the access logfile (Common Logfile Format). +# If you do not define any access logfiles within a <VirtualHost> +# container, they will be logged here. Contrariwise, if you *do* +# define per-<VirtualHost> access logfiles, transactions will be +# logged therein and *not* in this file. +# +CustomLog logs/access_log common + +# +# If you would like to have agent and referer logfiles, uncomment the +# following directives. +# +#CustomLog logs/referer_log referer +#CustomLog logs/agent_log agent + +# +# If you prefer a single logfile with access, agent, and referer information +# (Combined Logfile Format) you can use the following directive. +# +#CustomLog logs/access_log combined + +# +# Optionally add a line containing the server version and virtual host +# name to server-generated pages (error documents, FTP directory listings, +# mod_status and mod_info output etc., but not CGI generated documents). +# Set to "EMail" to also include a mailto: link to the ServerAdmin. +# Set to one of: On | Off | EMail +# +ServerSignature On + +# +# Aliases: Add here as many aliases as you need (with no limit). The format is +# Alias fakename realname +# +<IfModule mod_alias.c> + + # + # Note that if you include a trailing / on fakename then the server will + # require it to be present in the URL. So "/icons" isn't aliased in this + # example, only "/icons/".. + # + Alias /icons/ "sys:/apache/icons/" + + <Directory "sys:/apache/icons"> + Options Indexes MultiViews + AllowOverride None + Order allow,deny + Allow from all + </Directory> + + # + # ScriptAlias: This controls which directories contain server scripts. + # ScriptAliases are essentially the same as Aliases, except that + # documents in the realname directory are treated as applications and + # run by the server when requested rather than as documents sent to the client. + # The same rules about trailing "/" apply to ScriptAlias directives as to + # Alias. + # + ScriptAlias /cgi-bin/ "sys:/apache/cgi-bin/" + + # + # "sys:/apache/cgi-bin" should be changed to whatever your ScriptAliased + # CGI directory exists, if you have that configured. + # + <Directory "sys:/apache/cgi-bin"> + AllowOverride None + Options None + Order allow,deny + Allow from all + </Directory> + +</IfModule> +# End of aliases. + +# +# Redirect allows you to tell clients about documents which used to exist in +# your server's namespace, but do not anymore. This allows you to tell the +# clients where to look for the relocated document. +# Format: Redirect old-URI new-URL +# + +# +# Directives controlling the display of server-generated directory listings. +# +<IfModule mod_autoindex.c> + + # + # FancyIndexing is whether you want fancy directory indexing or standard + # + IndexOptions FancyIndexing + + # + # AddIcon* directives tell the server which icon to show for different + # files or filename extensions. These are only displayed for + # FancyIndexed directories. + # + AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip + + AddIconByType (TXT,/icons/text.gif) text/* + AddIconByType (IMG,/icons/image2.gif) image/* + AddIconByType (SND,/icons/sound2.gif) audio/* + AddIconByType (VID,/icons/movie.gif) video/* + + AddIcon /icons/binary.gif .bin .exe + AddIcon /icons/binhex.gif .hqx + AddIcon /icons/tar.gif .tar + AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv + AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip + AddIcon /icons/a.gif .ps .ai .eps + AddIcon /icons/layout.gif .html .shtml .htm .pdf + AddIcon /icons/text.gif .txt + AddIcon /icons/c.gif .c + AddIcon /icons/p.gif .pl .py + AddIcon /icons/f.gif .for + AddIcon /icons/dvi.gif .dvi + AddIcon /icons/uuencoded.gif .uu + AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl + AddIcon /icons/tex.gif .tex + AddIcon /icons/bomb.gif core + + AddIcon /icons/back.gif .. + AddIcon /icons/hand.right.gif README + AddIcon /icons/folder.gif ^^DIRECTORY^^ + AddIcon /icons/blank.gif ^^BLANKICON^^ + + # + # DefaultIcon is which icon to show for files which do not have an icon + # explicitly set. + # + DefaultIcon /icons/unknown.gif + + # + # AddDescription allows you to place a short description after a file in + # server-generated indexes. These are only displayed for FancyIndexed + # directories. + # Format: AddDescription "description" filename + # + #AddDescription "GZIP compressed document" .gz + #AddDescription "tar archive" .tar + #AddDescription "GZIP compressed tar archive" .tgz + + # + # ReadmeName is the name of the README file the server will look for by + # default, and append to directory listings. + # + # HeaderName is the name of a file which should be prepended to + # directory indexes. + # + # The server will first look for name.html and include it if found. + # If name.html doesn't exist, the server will then look for name.txt + # and include it as plaintext if found. + # + ReadmeName README + HeaderName HEADER + + # + # IndexIgnore is a set of filenames which directory indexing should ignore + # and not include in the listing. Shell-style wildcarding is permitted. + # + IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t + +</IfModule> +# End of indexing directives. + +# +# Document types. +# +<IfModule mod_mime.c> + + # + # AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress + # information on the fly. Note: Not all browsers support this. + # Despite the name similarity, the following Add* directives have nothing + # to do with the FancyIndexing customization directives above. + # + AddEncoding x-compress Z + AddEncoding x-gzip gz tgz + + # + # AddLanguage allows you to specify the language of a document. You can + # then use content negotiation to give a browser a file in a language + # it can understand. + # + # Note 1: The suffix does not have to be the same as the language + # keyword --- those with documents in Polish (whose net-standard + # language code is pl) may wish to use "AddLanguage pl .po" to + # avoid the ambiguity with the common suffix for perl scripts. + # + # Note 2: The example entries below illustrate that in quite + # some cases the two character 'Language' abbriviation is not + # identical to the two character 'Country' code for its country, + # E.g. 'Danmark/dk' versus 'Danish/da'. + # + # Note 3: In the case of 'ltz' we violate the RFC by using a three char + # specifier. But there is 'work in progress' to fix this and get + # the reference data for rfc1766 cleaned up. + # + # Danish (da) - Dutch (nl) - English (en) - Estonian (ee) + # French (fr) - German (de) - Greek-Modern (el) + # Italian (it) - Korean (kr) - Norwegian (no) + # Portugese (pt) - Luxembourgeois* (ltz) + # Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cz) + # Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja) + # Russian (ru) + # + AddLanguage da .dk + AddLanguage nl .nl + AddLanguage en .en + AddLanguage et .ee + AddLanguage fr .fr + AddLanguage de .de + AddLanguage el .el + AddLanguage he .he + AddCharset ISO-8859-8 .iso8859-8 + AddLanguage it .it + AddLanguage ja .ja + AddCharset ISO-2022-JP .jis + AddLanguage kr .kr + AddCharset ISO-2022-KR .iso-kr + AddLanguage no .no + AddLanguage pl .po + AddCharset ISO-8859-2 .iso-pl + AddLanguage pt .pt + AddLanguage pt-br .pt-br + AddLanguage ltz .lu + AddLanguage ca .ca + AddLanguage es .es + AddLanguage sv .se + AddLanguage cz .cz + AddLanguage ru .ru + AddLanguage tw .tw + AddCharset Big5 .Big5 .big5 + AddCharset WINDOWS-1251 .cp-1251 + AddCharset CP866 .cp866 + AddCharset ISO-8859-5 .iso-ru + AddCharset KOI8-R .koi8-r + AddCharset UCS-2 .ucs2 + AddCharset UCS-4 .ucs4 + AddCharset UTF-8 .utf8 + + # LanguagePriority allows you to give precedence to some languages + # in case of a tie during content negotiation. + # + # Just list the languages in decreasing order of preference. We have + # more or less alphabetized them here. You probably want to change this. + # + <IfModule mod_negotiation.c> + LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw + </IfModule> + + # + # AddType allows you to tweak mime.types without actually editing it, or to + # make certain files to be certain types. + # + # For example, the PHP 3.x module (not part of the Apache distribution - see + # http://www.php.net) will typically use: + # + #AddType application/x-httpd-php3 .php3 + #AddType application/x-httpd-php3-source .phps + # + # And for PHP 4.x, use: + # + #AddType application/x-httpd-php .php + #AddType application/x-httpd-php-source .phps + + AddType application/x-tar .tgz + + # + # AddHandler allows you to map certain file extensions to "handlers", + # actions unrelated to filetype. These can be either built into the server + # or added with the Action command (see below) + # + # If you want to use server side includes, or CGI outside + # ScriptAliased directories, uncomment the following lines. + # + # To use CGI scripts: + # + #AddHandler cgi-script .cgi + + # + # To use server-parsed HTML files + # + #AddType text/html .shtml + #AddHandler server-parsed .shtml + + # + # Uncomment the following line to enable Apache's send-asis HTTP file + # feature + # + #AddHandler send-as-is asis + + # + # If you wish to use server-parsed imagemap files, use + # + #AddHandler imap-file map + + # + # To enable type maps, you might want to use + # + #AddHandler type-map var + +</IfModule> +# End of document types. + +# +# Action lets you define media types that will execute a script whenever +# a matching file is called. This eliminates the need for repeated URL +# pathnames for oft-used CGI file processors. +# Format: Action media/type /cgi-script/location +# Format: Action handler-name /cgi-script/location +# + +# +# MetaDir: specifies the name of the directory in which Apache can find +# meta information files. These files contain additional HTTP headers +# to include when sending the document +# +#MetaDir .web + +# +# MetaSuffix: specifies the file name suffix for the file containing the +# meta information. +# +#MetaSuffix .meta + +# +# Customizable error response (Apache style) +# these come in three flavors +# +# 1) plain text +#ErrorDocument 500 "The server made a boo boo. +# n.b. the (") marks it as text, it does not get output +# +# 2) local redirects +#ErrorDocument 404 /missing.html +# to redirect to local URL /missing.html +#ErrorDocument 404 /cgi-bin/missing_handler.pl +# N.B.: You can redirect to a script or a document using server-side-includes. +# +# 3) external redirects +#ErrorDocument 402 http://some.other_server.com/subscription_info.html +# N.B.: Many of the environment variables associated with the original +# request will *not* be available to such a script. + +# +# Customize behaviour based on the browser +# +<IfModule mod_setenvif.c> + + # + # The following directives modify normal HTTP response behavior. + # The first directive disables keepalive for Netscape 2.x and browsers that + # spoof it. There are known problems with these browser implementations. + # The second directive is for Microsoft Internet Explorer 4.0b2 + # which has a broken HTTP/1.1 implementation and does not properly + # support keepalive when it is used on 301 or 302 (redirect) responses. + # + BrowserMatch "Mozilla/2" nokeepalive + BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 + + # + # The following directive disables HTTP/1.1 responses to browsers which + # are in violation of the HTTP/1.0 spec by not being able to grok a + # basic 1.1 response. + # + BrowserMatch "RealPlayer 4\.0" force-response-1.0 + BrowserMatch "Java/1\.0" force-response-1.0 + BrowserMatch "JDK/1\.0" force-response-1.0 + +</IfModule> + +# +# Allow server status reports, with the URL of http://servername/server-status +# Change the ".your_domain.com" to match your domain to enable. +# +<IfModule mod_info.c> + <Location /server-status> + SetHandler server-status + Order deny,allow + Deny from all + Allow from .your_domain.com + </Location> +</IfModule> + +# +# Allow remote server configuration reports, with the URL of +# http://servername/server-info (requires that mod_info.c be loaded). +# Change the ".your_domain.com" to match your domain to enable. +# +<IfModule mod_status.c> + <Location /server-info> + SetHandler server-info + Order deny,allow + Deny from all + Allow from .your_domain.com + </Location> +</IfModule> + +# +# There have been reports of people trying to abuse an old bug from pre-1.1 +# days. This bug involved a CGI script distributed as a part of Apache. +# By uncommenting these lines you can redirect these attacks to a logging +# script on phf.apache.org. Or, you can record them yourself, using the script +# support/phf_abuse_log.cgi. +# +#<Location /cgi-bin/phf*> +# Deny from all +# ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi +#</Location> + +# +# Proxy Server directives. Uncomment the following lines to +# enable the proxy server: +# +#<IfModule mod_proxy.c> +#ProxyRequests On +# +#<Directory proxy:*> +# Order deny,allow +# Deny from all +# Allow from .your_domain.com +#</Directory> + +# +# Enable/disable the handling of HTTP/1.1 "Via:" headers. +# ("Full" adds the server version; "Block" removes all outgoing Via: headers) +# Set to one of: Off | On | Full | Block +# +#ProxyVia On + +# +# To enable the cache as well, edit and uncomment the following lines: +# (no cacheing without CacheRoot) +# +#CacheRoot "sys:/apache/proxy" +#CacheSize 5 +#CacheGcInterval 4 +#CacheMaxExpire 24 +#CacheLastModifiedFactor 0.1 +#CacheDefaultExpire 1 +#NoCache a_domain.com another_domain.edu joes.garage_sale.com + +#</IfModule> +# End of proxy directives. + +### Section 3: Virtual Hosts +# +# VirtualHost: If you want to maintain multiple domains/hostnames on your +# machine you can setup VirtualHost containers for them. +# Please see the documentation at <URL:http://www.apache.org/docs/vhosts/> +# for further details before you try to setup virtual hosts. +# You may use the command line option '-S' to verify your virtual host +# configuration. + +# +# If you want to use name-based virtual hosts you need to define at +# least one IP address (and port number) for them. +# +#NameVirtualHost 12.34.56.78:80 +#NameVirtualHost 12.34.56.78 + +# +# VirtualHost example: +# Almost any Apache directive may go into a VirtualHost container. +# +#<VirtualHost ip.address.of.host.some_domain.com> +# ServerAdmin webmaster@host.some_domain.com +# DocumentRoot /www/docs/host.some_domain.com +# ServerName host.some_domain.com +# ErrorLog logs/host.some_domain.com-error_log +# CustomLog logs/host.some_domain.com-access_log common +#</VirtualHost> + +#<VirtualHost _default_:*> +#</VirtualHost> + +# +# SecureListen is the same as the Listen directive only it +# ensures the port will be secure. The second parameter +# specifies the certificate to use. "SSL CertificateIP" is +# the default. +# + +<IfModule mod_tls.c> + SecureListen 443 "SSL CertificateIP" +</IfModule> + diff --git a/usr.sbin/httpd/htdocs/README.rus b/usr.sbin/httpd/htdocs/README.rus new file mode 100644 index 00000000000..591d8680e8c --- /dev/null +++ b/usr.sbin/httpd/htdocs/README.rus @@ -0,0 +1,18 @@ +Apache test page, russian translation by Pavel Polischouk <pavelp@iil.intel.com> +Different russian encodings provided: + + Name iconv's codepage + ++index.html.dos - CP-866 aka ibm866; used by DOS and OS/2. +*index.html.iso - ISO-8859-5 +*index.html.koi - KOI8-R; used by UNIX flavours and Mac. + index.html.ucs2 - UCS-2 aka UNICODE aka UNICODEBIG aka UTF-16 + index.html.ucs4 - UCS-4 +*index.html.utf8 - UTF-8 +*index.html.win - CP-1251 aka windows-1251 aka MS-CYRILLIC; used by Windows + +* - supported by Netscape 4.72. ++ - Netscape is supposed to support this encoding, but fails to +read this page on Linux. Should be OK on systems like DOS and OS/2 where this +encoding is the default. +Does anyone need the UCS-2 and UCS-4? diff --git a/usr.sbin/httpd/htdocs/index.html.he.iso8859-8 b/usr.sbin/httpd/htdocs/index.html.he.iso8859-8 new file mode 100644 index 00000000000..84254886bc7 --- /dev/null +++ b/usr.sbin/httpd/htdocs/index.html.he.iso8859-8 @@ -0,0 +1,62 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> +<HTML> + <HEAD> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-8"> + <TITLE>Apache-ä úøù úð÷úäì ïåéñð óã</TITLE> + </HEAD> +<!-- Background white, links blue (unvisited), navy (visited), red (active) --> + <BODY + BGCOLOR="#FFFFFF" + TEXT="#000000" + LINK="#0000FF" + VLINK="#000080" + ALINK="#FF0000" + > + +<DIV ALIGN=right> + + <P> + + <BR> äæä ãåîòä úà äàåø äúà íà +<BR><A HREF="http://www.apache.org/httpd">Apache èðøèðéàä úøù</A> ìù äð÷úääù øîà äæ + <BR>!!!äçìöäá äøáò + <BR> êìù íéöá÷ä úà óéñåäì ìåëé äúà åéùëò + <BR>.äæä óãä úà óéìçäìå úàæä äöéçîì + +</DIV> + +<P><HR WIDTH="50%" SIZE="8"> + + <H2 ALIGN="CENTER">?úéôéöù øúàä íå÷îá úàæ àåø</H2> +<DIV ALIGN=right> + <P> + <BR> äæä øúàä ìò éàøçà éë ,ïàë äöîð äæä ãåîòä + <BR>.äæ èðøèðéàä úøùä ìù äéöøåâéôðå÷ä úà äðéù + <BR>.<STRONG>úåìàù íà úøùä éàøçà íà øù÷ øåöéì</STRONG> àð + <BR>úà äøöé øùà Apache Software Foundation + <BR>úøùä ú÷åæçú ìò úéàøçà äðéà ,äæ úøùä úðëåú + <BR>äéöøåâéôðå÷ úåéòá ïåøúôá äééòñì äìåëé äðéàå + .íäùìë +</DIV> + +<P><HR WIDTH="50%" SIZE="8"> + +<DIV ALIGN=right> + + + <P> + <BR> êåúá íéòöîð <A HREF="manual/index.html">äéöèðîå÷åãä éëîñî</A> + .úøùä úðëåú úìéáç + + + <P> + <BR>ãåîòä úéúçúá äöîðä ìîñá ùîúùäì éàùø äúà + <BR>.Apache é''ò ìòôåîù úøùä ìò ÷ø + + !!!Apache-á ùåîéùä ìò äãåú + +</DIV> + +<DIV ALIGN="CENTER"><IMG SRC="apache_pb.gif" ALT=""></DIV> +</BODY> +</HTML> diff --git a/usr.sbin/httpd/htdocs/index.html.kr.iso-kr b/usr.sbin/httpd/htdocs/index.html.kr.iso-kr new file mode 100644 index 00000000000..c89eeb7e47a --- /dev/null +++ b/usr.sbin/httpd/htdocs/index.html.kr.iso-kr @@ -0,0 +1,40 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//KR"> +<HTML> + <HEAD> + <META http-equiv="Content-Type" content="text/html; charset=eucKR"> + <TITLE>¾ÆÆÄÄ¡ ¼³Ä¡¸¦ À§ÇÑ Å×½ºÆ®ÆäÀÌÁö</TITLE> + </HEAD> +<!-- Background white, links blue (unvisited), navy (visited), red (active) --> + <BODY + BGCOLOR="#FFFFFF" + TEXT="#000000" + LINK="#0000FF" + VLINK="#000080" + ALINK="#FF0000" + > + + +<P> +ÇöÀçȸéÀÌ Àß º¸À̽Ŵٸé ÀÌ ½Ã½ºÅÛ¿¡ <A HREF="http://www.apache.org/httpd">Apache À¥¼¹ö</A> ¼ÒÇÁÆ®¿þ¾îÀÇ ¼³Ä¡°¡ ¼º°øÀûÀ¸·Î ³¡³µ´Ù´Â°É ÀǹÌÇÕ´Ï´Ù. ¿©·¯ºÐÀº ¾Æ¸¶ °ð ÀÌ ÆäÀÌÁö¸¦ Áö¿ì°í µð·ºÅ丮¿¡ »õ·Î¿î ³»¿ëÀ» Ãß°¡ÇÒ °ÍÀÔ´Ï´Ù. + +<P><HR WIDTH="50%" SIZE="8"> + +<H2 ALIGN="CENTER">¿©·¯ºÐÀÌ ¿¹»óÇÑ À¥½ÎÀÌÆ® ´ë½Å ÀÌ È¸éÀÌ º¸ÀԴϱî?</H2> + +<P> +½ÎÀÌÆ® °ü¸®ÀÚ°¡ À¥ ¼¹öÀÇ ¼³Á¤ÆÄÀÏÀ» º¯°æÇ߱⠶§¹®¿¡ ÀÌ ÆäÀÌÁö°¡ º¸ÀÌ´Â °Í ÀÔ´Ï´Ù. +<STRONG>Áú¹®»çÇ×Àº °¢ ¼¹ö°ü¸® Ã¥ÀÓÀÚ¿¡°Ô ¹®ÀÇÇϽñ⠹ٶø´Ï´Ù.</STRONG> Apache Software FoundationÀº Çö ½ÎÀÌÆ®ÀÇ °ü¸®ÀÚ°¡ »ç¿ëÁßÀÎ À¥¼¹ö¸¦ ¸¸µç ´Üü +ÀÏ »Ó ½ÎÀÌÆ®ÀÇ °ü¸®¹æ¹ýÀ̳ª ¼³Á¤¹®Á¦¿¡ °üÇÑ µµ¿òÀ» µå¸± ¼ö ¾ø½À´Ï´Ù. + +<P><HR WIDTH="50%" SIZE="8"> + + +<P> +¾ÆÆÄÄ¡ <A HREF="manual/index.html">¹®¼</A>´Â ÀÌ ¹èÆ÷ÆÇ¿¡ Æ÷ÇԵǾî ÀÖ½À´Ï´Ù. + +<P> +¾Æ·¡¿¡ ÀÖ´Â Apache À̹ÌÁö¸¦ »ç¿ëÇÏ´Â°Ç ¿©·¯ºÐÀÇ ÀÚÀ¯ÀÔ´Ï´Ù. ¾ÆÆÄÄ¡¸¦ »ç¿ëÇØ Áּż °¨»çÇÕ´Ï´Ù! + +<DIV ALIGN="CENTER"><IMG SRC="apache_pb.gif" ALT=""></DIV> +</BODY> +</HTML> diff --git a/usr.sbin/httpd/htdocs/index.html.no b/usr.sbin/httpd/htdocs/index.html.no new file mode 100644 index 00000000000..b69c4ce163c --- /dev/null +++ b/usr.sbin/httpd/htdocs/index.html.no @@ -0,0 +1,49 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> +<HTML> + <HEAD> + <TITLE>Testside for Apache Installasjon på Webside</TITLE> + </HEAD> +<!-- Background white, links blue (unvisited), navy (visited), red (active) --> + <BODY + BGCOLOR="#FFFFFF" + TEXT="#000000" + LINK="#0000FF" + VLINK="#000080" + ALINK="#FF0000" + > + <H1 ALIGN="CENTER"> + Det gikk bra! Det Apache Web Server Er Nå Installert her! + </H1> + <P> + Hvis du kan se denne siden, det betyr at de som eier denne domene (domain) + har nettopp greid å installere <A HREF="http://www.apache.org/">Apache Web server</A> + software. De må tilføye innhold til denne katalog og erstatte denne + plassholder siden, ellers peke serveren til de virkelige innhold. + </P> + <HR> + <BLOCKQUOTE> + Hvis du ser denne siden istedenfor den du ventet for, vennligst + <STRONG>ta kontakt med websever administratøren.</STRONG> + (Prøv å sende e-post til <SAMP><Webmaster@<EM>domene</EM>></SAMP>.) + Selv om denne hjemmesiden driver med Apache software, har den ingen annen + tilknytting til Apache Gruppen. Vennligst ikke send post angående denne hjemmesiden eller + dets innhold til Apache programmerere. Hvis du gjør det, din beskjed blir + <STRONG><BIG>oversett</BIG></STRONG>. + </BLOCKQUOTE> + <HR> + <P> + Den Apache + <A + HREF="manual/index.html" + >dokumentasjon</A> + er inkludert i denne distribusjonen. + </P> + <P> + Denne sidens Webmaster kan bruke det grafikk nedenfør på en Apache-drevet Webserver. + Takk for at du bruker Apache! + </P> + <DIV ALIGN="CENTER"> + <IMG SRC="apache_pb.gif" ALT=""> + </DIV> + </BODY> +</HTML> diff --git a/usr.sbin/httpd/htdocs/index.html.ru.cp-1251 b/usr.sbin/httpd/htdocs/index.html.ru.cp-1251 new file mode 100644 index 00000000000..bfb8a166351 --- /dev/null +++ b/usr.sbin/httpd/htdocs/index.html.ru.cp-1251 @@ -0,0 +1,34 @@ +<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=windows-1251"> + <meta name="GENERATOR" content="Mozilla/4.72 [koi8-r] (X11; U; Linux 2.2.12-20smp i686) [Netscape]"> + <title>Òåñòîâàÿ ñòðàíèöà óñòàíîâêè Apache</title> +<!-- Áåëûé ôîí, ññûëêè: ñèíèå (íåïîñåù¸ííûå), ò¸ìíî-ôèîëåòîâûå (ïîñåù¸ííûå), êðàñíûå (ïîñåù¸ííûå) --> +</head> +<body text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#000080" alink="#FF0000"> +Åñëè Âû ýòî âèäèòå, ýòî çíà÷èò, ÷òî óñòàíîâêà +ÏÎ <a href="http://www.apache.org/httpd">âåá-ñåðâåðà Apache</a> íà ýòîé +ñèñòåìå çàâåðøèëàñü óñïåøíî. Âû ìîæåòå òåïåðü äîáàâëÿòü ñîäåðæèìîå â ýòó +äèðåêòîðèþ è çàìåíèòü ýòó ñòðàíèöó. +<p> +<hr WIDTH="50%" SIZE="8"> +<center> +<h2> +Âû âèäèòå ýòî âìåñòî îæèäàåìîé ñòðàíèöû?</h2></center> +Ýòà ñòðàíèöà íàõîäèòñÿ çäåñü ïîòîìó, ÷òî àäìèíèñòðàòîð ñèñòåìû èçìåíèë +êîíôèãóðàöèþ ýòîãî âåá-ñåðâåðà. Ïîæàëóéñòà, <b>ñâÿæèòåñü ñ ëèöîì, îòâåòñâåííûì +çà ïîääåðæêó ýòîãî ñåðâåðà äëÿ âûÿñíåíèÿ âàøèõ âîïðîñîâ.</b> Apache Software +Foundation, àâòîð ÏÎ âåá-ñåðâåðà, êîòîðûì ïîëüçóåòñÿ àäìèíèñòðàòîð ýòîé +ñèñòåìû, íå ñâÿçàí ñ ïîääåðæêîé ýòîé ñèñòåìû è íå ìîæåò ïîìî÷ü Âàì +ðàçðåøèòü ïðîáëåìû êîíôèãóðàöèè. +<p> +<hr WIDTH="50%" SIZE="8"> +<p><a href="manual/index.html">Äîêóìåíòàöèÿ</a> ïî âåá-ñåðâåðó Apache ïðèëàãàåòñÿ +ê êîìïëåêòó ÏÎ. +<p>Âû ìîæåòå ñâîáîäíî èñïîëüçîâàòü ïèêòîãðàììó, íàõîäÿùóþñÿ íèæå, íà âåá-ñåðâåðå, +èñïîëüçóþùèì ÏÎ Apache. Ñïàñèáî çà èñïîëüçîâàíèå Apache! +<center><img SRC="apache_pb.gif" ALT="" ></center> + +</body> +</html> diff --git a/usr.sbin/httpd/htdocs/index.html.ru.cp866 b/usr.sbin/httpd/htdocs/index.html.ru.cp866 new file mode 100644 index 00000000000..b9f2615f379 --- /dev/null +++ b/usr.sbin/httpd/htdocs/index.html.ru.cp866 @@ -0,0 +1,34 @@ +<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=ibm866"> + <meta name="GENERATOR" content="Mozilla/4.72 [koi8-r] (X11; U; Linux 2.2.12-20smp i686) [Netscape]"> + <title>’¥á⮢ ï áâà ¨æ ãáâ ®¢ª¨ Apache</title> +<!-- ¥«ë© ä®, áá뫪¨: ᨨ¥ (¥¯®á¥éñë¥), âñ¬®-䨮«¥â®¢ë¥ (¯®á¥éñë¥), ªà áë¥ (¯®á¥éñë¥) --> +</head> +<body text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#000080" alink="#FF0000"> +…᫨ ‚ë íâ® ¢¨¤¨â¥, íâ® § ç¨â, çâ® ãáâ ®¢ª +Ž <a href="http://www.apache.org/httpd">¢¥¡-á¥à¢¥à Apache</a> í⮩ +á¨á⥬¥ § ¢¥à訫 áì ãᯥè®. ‚ë ¬®¦¥â¥ ⥯¥àì ¤®¡ ¢«ïâì ᮤ¥à¦¨¬®¥ ¢ íâã +¤¨à¥ªâ®à¨î ¨ § ¬¥¨âì íâã áâà ¨æã. +<p> +<hr WIDTH="50%" SIZE="8"> +<center> +<h2> +‚ë ¢¨¤¨â¥ íâ® ¢¬¥áâ® ®¦¨¤ ¥¬®© áâà ¨æë?</h2></center> +â áâà ¨æ 室¨âáï §¤¥áì ¯®â®¬ã, çâ® ¤¬¨¨áâà â®à á¨áâ¥¬ë ¨§¬¥¨« +ª®ä¨£ãà æ¨î í⮣® ¢¥¡-á¥à¢¥à . ®¦ «ã©áâ , <b>á¢ï¦¨â¥áì á «¨æ®¬, ®â¢¥âá¢¥ë¬ +§ ¯®¤¤¥à¦ªã í⮣® á¥à¢¥à ¤«ï ¢ëïá¥¨ï ¢ è¨å ¢®¯à®á®¢.</b> Apache Software +Foundation, ¢â®à Ž ¢¥¡-á¥à¢¥à , ª®â®àë¬ ¯®«ì§ã¥âáï ¤¬¨¨áâà â®à í⮩ +á¨á⥬ë, ¥ á¢ï§ á ¯®¤¤¥à¦ª®© í⮩ á¨áâ¥¬ë ¨ ¥ ¬®¦¥â ¯®¬®çì ‚ ¬ +à §à¥è¨âì ¯à®¡«¥¬ë ª®ä¨£ãà 樨. +<p> +<hr WIDTH="50%" SIZE="8"> +<p><a href="manual/index.html">„®ªã¬¥â æ¨ï</a> ¯® ¢¥¡-á¥à¢¥àã Apache ¯à¨« £ ¥âáï +ª ª®¬¯«¥ªâã Ž. +<p>‚ë ¬®¦¥â¥ ᢮¡®¤® ¨á¯®«ì§®¢ âì ¯¨ªâ®£à ¬¬ã, 室ïéãîáï ¨¦¥, ¢¥¡-á¥à¢¥à¥, +¨á¯®«ì§ãî騬 Ž Apache. ‘¯ ᨡ® § ¨á¯®«ì§®¢ ¨¥ Apache! +<center><img SRC="apache_pb.gif" ALT="" ></center> + +</body> +</html> diff --git a/usr.sbin/httpd/htdocs/index.html.ru.iso-ru b/usr.sbin/httpd/htdocs/index.html.ru.iso-ru new file mode 100644 index 00000000000..114d9f75054 --- /dev/null +++ b/usr.sbin/httpd/htdocs/index.html.ru.iso-ru @@ -0,0 +1,34 @@ +<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-5"> + <meta name="GENERATOR" content="Mozilla/4.72 [koi8-r] (X11; U; Linux 2.2.12-20smp i686) [Netscape]"> + <title>ÂÕáâÞÒÐï áâàÐÝØæÐ ãáâÐÝÞÒÚØ Apache</title> +<!-- ±ÕÛëÙ äÞÝ, ááëÛÚØ: áØÝØÕ (ÝÕßÞáÕéñÝÝëÕ), âñÜÝÞ-äØÞÛÕâÞÒëÕ (ßÞáÕéñÝÝëÕ), ÚàÐáÝëÕ (ßÞáÕéñÝÝëÕ) --> +</head> +<body text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#000080" alink="#FF0000"> +µáÛØ ²ë íâÞ ÒØÔØâÕ, íâÞ ×ÝÐçØâ, çâÞ ãáâÐÝÞÒÚÐ +¿¾ <a href="http://www.apache.org/httpd">ÒÕÑ-áÕàÒÕàÐ Apache</a> ÝÐ íâÞÙ +áØáâÕÜÕ ×ÐÒÕàèØÛÐáì ãáßÕèÝÞ. ²ë ÜÞÖÕâÕ âÕßÕàì ÔÞÑÐÒÛïâì áÞÔÕàÖØÜÞÕ Ò íâã +ÔØàÕÚâÞàØî Ø ×ÐÜÕÝØâì íâã áâàÐÝØæã. +<p> +<hr WIDTH="50%" SIZE="8"> +<center> +<h2> +²ë ÒØÔØâÕ íâÞ ÒÜÕáâÞ ÞÖØÔÐÕÜÞÙ áâàÐÝØæë?</h2></center> +ÍâÐ áâàÐÝØæÐ ÝÐåÞÔØâáï ×ÔÕáì ßÞâÞÜã, çâÞ ÐÔÜØÝØáâàÐâÞà áØáâÕÜë Ø×ÜÕÝØÛ +ÚÞÝäØÓãàÐæØî íâÞÓÞ ÒÕÑ-áÕàÒÕàÐ. ¿ÞÖÐÛãÙáâÐ, <b>áÒïÖØâÕáì á ÛØæÞÜ, ÞâÒÕâáÒÕÝÝëÜ +×Ð ßÞÔÔÕàÖÚã íâÞÓÞ áÕàÒÕàÐ ÔÛï ÒëïáÝÕÝØï ÒÐèØå ÒÞßàÞáÞÒ.</b> Apache Software +Foundation, ÐÒâÞà ¿¾ ÒÕÑ-áÕàÒÕàÐ, ÚÞâÞàëÜ ßÞÛì×ãÕâáï ÐÔÜØÝØáâàÐâÞà íâÞÙ +áØáâÕÜë, ÝÕ áÒï×ÐÝ á ßÞÔÔÕàÖÚÞÙ íâÞÙ áØáâÕÜë Ø ÝÕ ÜÞÖÕâ ßÞÜÞçì ²ÐÜ +àÐ×àÕèØâì ßàÞÑÛÕÜë ÚÞÝäØÓãàÐæØØ. +<p> +<hr WIDTH="50%" SIZE="8"> +<p><a href="manual/index.html">´ÞÚãÜÕÝâÐæØï</a> ßÞ ÒÕÑ-áÕàÒÕàã Apache ßàØÛÐÓÐÕâáï +Ú ÚÞÜßÛÕÚâã ¿¾. +<p>²ë ÜÞÖÕâÕ áÒÞÑÞÔÝÞ ØáßÞÛì×ÞÒÐâì ßØÚâÞÓàÐÜÜã, ÝÐåÞÔïéãîáï ÝØÖÕ, ÝÐ ÒÕÑ-áÕàÒÕàÕ, +ØáßÞÛì×ãîéØÜ ¿¾ Apache. ÁßÐáØÑÞ ×Ð ØáßÞÛì×ÞÒÐÝØÕ Apache! +<center><img SRC="apache_pb.gif" ALT="" ></center> + +</body> +</html> diff --git a/usr.sbin/httpd/htdocs/index.html.ru.koi8-r b/usr.sbin/httpd/htdocs/index.html.ru.koi8-r new file mode 100644 index 00000000000..685b56207d0 --- /dev/null +++ b/usr.sbin/httpd/htdocs/index.html.ru.koi8-r @@ -0,0 +1,34 @@ +<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=koi8-r"> + <meta name="GENERATOR" content="Mozilla/4.72 [koi8-r] (X11; U; Linux 2.2.12-20smp i686) [Netscape]"> + <title>ôÅÓÔÏ×ÁÑ ÓÔÒÁÎÉÃÁ ÕÓÔÁÎÏ×ËÉ Apache</title> +<!-- âÅÌÙÊ ÆÏÎ, ÓÓÙÌËÉ: ÓÉÎÉÅ (ÎÅÐÏÓÅÝ£ÎÎÙÅ), Ô£ÍÎÏ-ÆÉÏÌÅÔÏ×ÙÅ (ÐÏÓÅÝ£ÎÎÙÅ), ËÒÁÓÎÙÅ (ÐÏÓÅÝ£ÎÎÙÅ) --> +</head> +<body text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#000080" alink="#FF0000"> +åÓÌÉ ÷Ù ÜÔÏ ×ÉÄÉÔÅ, ÜÔÏ ÚÎÁÞÉÔ, ÞÔÏ ÕÓÔÁÎÏ×ËÁ +ðï <a href="http://www.apache.org/httpd">×ÅÂ-ÓÅÒ×ÅÒÁ Apache</a> ÎÁ ÜÔÏÊ +ÓÉÓÔÅÍÅ ÚÁ×ÅÒÛÉÌÁÓØ ÕÓÐÅÛÎÏ. ÷Ù ÍÏÖÅÔÅ ÔÅÐÅÒØ ÄÏÂÁ×ÌÑÔØ ÓÏÄÅÒÖÉÍÏÅ × ÜÔÕ +ÄÉÒÅËÔÏÒÉÀ É ÚÁÍÅÎÉÔØ ÜÔÕ ÓÔÒÁÎÉÃÕ. +<p> +<hr WIDTH="50%" SIZE="8"> +<center> +<h2> +÷Ù ×ÉÄÉÔÅ ÜÔÏ ×ÍÅÓÔÏ ÏÖÉÄÁÅÍÏÊ ÓÔÒÁÎÉÃÙ?</h2></center> +üÔÁ ÓÔÒÁÎÉÃÁ ÎÁÈÏÄÉÔÓÑ ÚÄÅÓØ ÐÏÔÏÍÕ, ÞÔÏ ÁÄÍÉÎÉÓÔÒÁÔÏÒ ÓÉÓÔÅÍÙ ÉÚÍÅÎÉÌ +ËÏÎÆÉÇÕÒÁÃÉÀ ÜÔÏÇÏ ×ÅÂ-ÓÅÒ×ÅÒÁ. ðÏÖÁÌÕÊÓÔÁ, <b>Ó×ÑÖÉÔÅÓØ Ó ÌÉÃÏÍ, ÏÔ×ÅÔÓ×ÅÎÎÙÍ +ÚÁ ÐÏÄÄÅÒÖËÕ ÜÔÏÇÏ ÓÅÒ×ÅÒÁ ÄÌÑ ×ÙÑÓÎÅÎÉÑ ×ÁÛÉÈ ×ÏÐÒÏÓÏ×.</b> Apache Software +Foundation, Á×ÔÏÒ ðï ×ÅÂ-ÓÅÒ×ÅÒÁ, ËÏÔÏÒÙÍ ÐÏÌØÚÕÅÔÓÑ ÁÄÍÉÎÉÓÔÒÁÔÏÒ ÜÔÏÊ +ÓÉÓÔÅÍÙ, ÎÅ Ó×ÑÚÁÎ Ó ÐÏÄÄÅÒÖËÏÊ ÜÔÏÊ ÓÉÓÔÅÍÙ É ÎÅ ÍÏÖÅÔ ÐÏÍÏÞØ ÷ÁÍ +ÒÁÚÒÅÛÉÔØ ÐÒÏÂÌÅÍÙ ËÏÎÆÉÇÕÒÁÃÉÉ. +<p> +<hr WIDTH="50%" SIZE="8"> +<p><a href="manual/index.html">äÏËÕÍÅÎÔÁÃÉÑ</a> ÐÏ ×ÅÂ-ÓÅÒ×ÅÒÕ Apache ÐÒÉÌÁÇÁÅÔÓÑ +Ë ËÏÍÐÌÅËÔÕ ðï. +<p>÷Ù ÍÏÖÅÔÅ Ó×ÏÂÏÄÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ ÐÉËÔÏÇÒÁÍÍÕ, ÎÁÈÏÄÑÝÕÀÓÑ ÎÉÖÅ, ÎÁ ×ÅÂ-ÓÅÒ×ÅÒÅ, +ÉÓÐÏÌØÚÕÀÝÉÍ ðï Apache. óÐÁÓÉÂÏ ÚÁ ÉÓÐÏÌØÚÏ×ÁÎÉÅ Apache! +<center><img SRC="apache_pb.gif" ALT="" ></center> + +</body> +</html> diff --git a/usr.sbin/httpd/htdocs/index.html.ru.utf8 b/usr.sbin/httpd/htdocs/index.html.ru.utf8 new file mode 100644 index 00000000000..f8a93c30206 --- /dev/null +++ b/usr.sbin/httpd/htdocs/index.html.ru.utf8 @@ -0,0 +1,34 @@ +<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <meta name="GENERATOR" content="Mozilla/4.72 [koi8-r] (X11; U; Linux 2.2.12-20smp i686) [Netscape]"> + <title>ТеÑÑ‚Ð¾Ð²Ð°Ñ Ñтраница уÑтановки Apache</title> +<!-- Белый фон, ÑÑылки: Ñиние (непоÑещённые), тёмно-фиолетовые (поÑещённые), краÑные (поÑещённые) --> +</head> +<body text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#000080" alink="#FF0000"> +ЕÑли Ð’Ñ‹ Ñто видите, Ñто значит, что уÑтановка +ПО <a href="http://www.apache.org/httpd">веб-Ñервера Apache</a> на Ñтой +ÑиÑтеме завершилаÑÑŒ уÑпешно. Ð’Ñ‹ можете теперь добавлÑÑ‚ÑŒ Ñодержимое в Ñту +директорию и заменить Ñту Ñтраницу. +<p> +<hr WIDTH="50%" SIZE="8"> +<center> +<h2> +Ð’Ñ‹ видите Ñто вмеÑто ожидаемой Ñтраницы?</h2></center> +Ðта Ñтраница находитÑÑ Ð·Ð´ÐµÑÑŒ потому, что админиÑтратор ÑиÑтемы изменил +конфигурацию Ñтого веб-Ñервера. ПожалуйÑта, <b>ÑвÑжитеÑÑŒ Ñ Ð»Ð¸Ñ†Ð¾Ð¼, ответÑвенным +за поддержку Ñтого Ñервера Ð´Ð»Ñ Ð²Ñ‹ÑÑÐ½ÐµÐ½Ð¸Ñ Ð²Ð°ÑˆÐ¸Ñ… вопроÑов.</b> Apache Software +Foundation, автор ПО веб-Ñервера, которым пользуетÑÑ Ð°Ð´Ð¼Ð¸Ð½Ð¸Ñтратор Ñтой +ÑиÑтемы, не ÑвÑзан Ñ Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶ÐºÐ¾Ð¹ Ñтой ÑиÑтемы и не может помочь Вам +разрешить проблемы конфигурации. +<p> +<hr WIDTH="50%" SIZE="8"> +<p><a href="manual/index.html">ДокументациÑ</a> по веб-Ñерверу Apache прилагаетÑÑ +к комплекту ПО. +<p>Ð’Ñ‹ можете Ñвободно иÑпользовать пиктограмму, находÑщуюÑÑ Ð½Ð¸Ð¶Ðµ, на веб-Ñервере, +иÑпользующим ПО Apache. СпаÑибо за иÑпользование Apache! +<center><img SRC="apache_pb.gif" ALT="" ></center> + +</body> +</html> diff --git a/usr.sbin/httpd/htdocs/manual/misc/tutorials.html b/usr.sbin/httpd/htdocs/manual/misc/tutorials.html new file mode 100644 index 00000000000..1891637f33c --- /dev/null +++ b/usr.sbin/httpd/htdocs/manual/misc/tutorials.html @@ -0,0 +1,206 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> +<HTML> +<HEAD> +<TITLE>Apache Tutorials</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> + +<H1 ALIGN="CENTER">Apache Tutorials</H1> + +<P>The following documents give you step-by-step instructions on how +to accomplish common tasks with the Apache http server. Many of these +documents are located at external sites and are not the work of the +Apache Software Foundation. Copyright to documents on external sites +is owned by the authors or their assignees. Please consult the <A +HREF="../">official Apache Server documentation</A> to verify what you +read on external sites. + + +<H2>Installation & Getting Started</H2> + +<UL> + +<LI><A +HREF="http://apachetoday.com/news_story.php3?ltsn=2000-06-1-001-01-NW-DP-LF" +>Getting Started with Apache 1.3</A> (ApacheToday) + +<LI><A +HREF="http://apachetoday.com/news_story.php3?ltsn=2000-07-10-001-01-NW-LF-SW" +>Configuring Your Apache Server Installation</A> (ApacheToday) + +<LI><A +HREF="http://oreilly.apacheweek.com/pub/a/apache/2000/02/24/installing_apache.html" +>Getting, Installing, and Running Apache (on Unix)</A> (O'Reilly +Network Apache DevCenter) + +<LI><A HREF="http://www.builder.com/Servers/Apache/ss01.html">Maximum +Apache: Getting Started</A> (CNET Builder.com) + +<LI><A HREF="http://www.devshed.com/Server_Side/Administration/APACHE/" +>How to Build the Apache of Your Dreams</A> (Developer Shed) + +</UL> + + +<H2>Basic Configuration</H2> + +<UL> + +<LI><A +HREF="http://oreilly.apacheweek.com/pub/a/apache/2000/03/02/configuring_apache.html" +>An Amble Through Apache Configuration</A> (O'Reilly Network Apache +DevCenter) + +<LI><A +HREF="http://apachetoday.com/news_story.php3?ltsn=2000-07-19-002-01-NW-LF-SW" +>Using .htaccess Files with Apache</A> (ApacheToday) + +<LI><A +HREF="http://apachetoday.com/news_story.php3?ltsn=2000-07-17-001-01-PS" +>Setting Up Virtual Hosts</A> (ApacheToday) + +<LI><A HREF="http://www.builder.com/Servers/Apache/ss02.html">Maximum +Apache: Configure Apache</A> (CNET Builder.com) + +</UL> + +<H2>Security</H2> + +<UL> + +<LI><A +HREF="http://www.linuxplanet.com/linuxplanet/tutorials/1527/1/">Security +and Apache: An Essential Primer</A> (LinuxPlanet) + +<LI><A HREF="http://www.apacheweek.com/features/userauth">Using User +Authentication</A> (Apacheweek) + +<LI><A HREF="http://www.apacheweek.com/features/dbmauth">DBM User +Authentication</A> (Apacheweek) + +<LI><A +HREF="http://linux.com/security/newsitem.phtml?sid=12&aid=3549">An +Introduction to Securing Apache</A> (Linux.com) + +<LI><A +HREF="http://linux.com/security/newsitem.phtml?sid=12&aid=3667">Securing +Apache - Access Control</A> (Linux.com) + +<LI>Apache Authentication <A +HREF="http://apachetoday.com/news_story.php3?ltsn=2000-07-24-002-01-NW-LF-SW" +>Part 1</A> - <A +HREF="http://apachetoday.com/news_story.php3?ltsn=2000-07-31-001-01-NW-DP-LF" +>Part 2</A> - <A +HREF="http://apachetoday.com/news_story.php3?ltsn=2000-08-07-001-01-NW-LF-SW" +>Part 3</A> - <A +HREF="http://apachetoday.com/news_story.php3?ltsn=2000-08-14-001-01-NW-LF-SW" +>Part 4</A> (ApacheToday) + +</UL> + +<H2>Logging</H2> + +<UL> + +<LI><A +HREF="http://oreilly.apacheweek.com/pub/a/apache/2000/03/10/log_rhythms.html" +>Log Rhythms</A> (O'Reilly Network Apache DevCenter) + +<LI><A HREF="http://www.apacheweek.com/features/logfiles">Gathering +Visitor Information: Customising Your Logfiles</A> (Apacheweek) + +<LI>Apache Guide: Logging +<A HREF="http://apachetoday.com/news_story.php3?ltsn=2000-08-21-003-01-NW-LF-SW" +>Part 1</A> - +<A HREF="http://apachetoday.com/news_story.php3?ltsn=2000-08-28-001-01-NW-LF-SW" +>Part 2</A> - +<A HREF="http://apachetoday.com/news_story.php3?ltsn=2000-09-05-001-01-NW-LF-SW" +>Part 3</A> - +<A HREF="http://apachetoday.com/news_story.php3?ltsn=2000-09-18-003-01-NW-LF-SW" +>Part 4</A> - +<A HREF="http://apachetoday.com/news_story.php3?ltsn=2000-09-25-001-01-NW-LF-SW" +>Part 5</A> (ApacheToday) + +</UL> + +<H2>CGI and SSI</H2> + +<UL> + +<LI><A +HREF="http://apachetoday.com/news_story.php3?ltsn=2000-06-05-001-10-NW-LF-SW" +>Dynamic Content with CGI</A> (ApacheToday) + +<LI><A +HREF="http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html">The +Idiot's Guide to Solving Perl CGI Problems</A> (CPAN) + +<LI><A +HREF="http://www.linuxplanet.com/linuxplanet/tutorials/1445/1/">Executing +CGI Scripts as Other Users</A> (LinuxPlanet) + +<LI><A HREF="http://www.htmlhelp.org/faq/cgifaq.html">CGI Programming +FAQ</A> (Web Design Group) + +<LI>Introduction to Server Side Includes <A +HREF="http://apachetoday.com/news_story.php3?ltsn=2000-06-12-001-01-PS">Part +1</A> - <A +HREF="http://apachetoday.com/news_story.php3?ltsn=2000-06-19-002-01-NW-LF-SW" +>Part 2</A> (ApacheToday) + +<LI><A +HREF="http://apachetoday.com/news_story.php3?ltsn=2000-06-26-001-01-NW-LF-SW" +>Advanced SSI Techniques</A> (ApacheToday) + +<LI><A +HREF="http://www.builder.com/Servers/ApacheFiles/082400/">Setting up +CGI and SSI with Apache</A> (CNET Builder.com) + +</UL> + +<H2>Other Features</H2> + +<UL> + +<LI><A HREF="http://www.apacheweek.com/features/negotiation">Content +Negotiation Explained</A> (Apacheweek) + +<LI><A HREF="http://www.apacheweek.com/features/imagemaps">Using +Apache Imagemaps</A> (Apacheweek) + +<LI><A +HREF="http://apachetoday.com/news_story.php3?ltsn=2000-06-14-002-01-PS" +>Keeping Your Images from Adorning Other Sites</A> (ApacheToday) + +</UL> + + +<P>If you have a pointer to a an accurate and well-written tutorial +not included here, please let us know by submitting it to the +<A HREF="http://bugs.apache.org/">Apache Bug Database</A>. + +<HR> + +<H3 ALIGN="CENTER"> + Apache HTTP Server Version 1.3 +</H3> + +<A HREF="./"><IMG SRC="../images/index.gif" ALT="Index"></A> +<A HREF="../"><IMG SRC="../images/home.gif" ALT="Home"></A> + +</BODY> +</HTML> diff --git a/usr.sbin/httpd/htdocs/manual/mpeix.html b/usr.sbin/httpd/htdocs/manual/mpeix.html new file mode 100644 index 00000000000..d7c053dea8b --- /dev/null +++ b/usr.sbin/httpd/htdocs/manual/mpeix.html @@ -0,0 +1,430 @@ +<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta name="GENERATOR" content="Mozilla/4.75 [en] (Win98; U) [Netscape]"> + <meta name="Author" content="Mark Bixby - mark@bixby.org"> + <title>Using Apache with HP MPE/iX</title> +<!-- Background white, links blue (unvisited), navy (visited), red (active) --> +</head> +<body text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#000080" alink="#FF0000"> +<DIV ALIGN="CENTER"> + <IMG SRC="images/sub.gif" ALT="[APACHE DOCUMENTATION]"> + <H3> + Apache HTTP Server + </H3> +</DIV> + +<center> +<h1> +Using Apache With HP MPE/iX</h1></center> +This document explains how to compile, install, configure and run Apache +1.3 under HP MPE/iX. +<p>The bug reporting page and new-httpd mailing list are NOT provided to +answer questions about configuration or running Apache. Before you submit +a bug report or request, first consult this document, the <a href="misc/FAQ.html">Frequently +Asked Questions</a> page and the other relevant documentation topics. If +you still have a question or problem, post it to the <a href="news:comp.sys.hp.mpe">comp.sys.hp.mpe</a> +newsgroup or the associated <a href="http://jazz.external.hp.com/papers/hp3000-info.html">HP3000-L +mailing list</a>, where many Apache users and several contributors are +more than willing to answer new and obscure questions about using Apache +on MPE/iX. +<p><a href="http://www.deja.com/group/comp.sys.hp.mpe">deja.com's newsgroup +archives</a> offer easy browsing of previous questions. Searching the newsgroup +archives, you will usually find your question was already asked and answered +by other users! +<p> +<hr> +<ul> +<li> +<a href="#req">Requirements</a></li> + +<li> +<a href="#implement">Implementation Considerations</a></li> + +<li> +<a href="#binaries">Binary Distributions</a></li> + +<li> +<a href="#accounting">Create the Accounting Structure</a></li> + +<li> +<a href="#down">Downloading Apache</a></li> + +<li> +<a href="#compile">Compiling Apache</a></li> + +<li> +<a href="#inst">Installing Apache</a></li> + +<li> +<a href="#config">Configuring Apache</a></li> + +<li> +<a href="#run">Running Apache</a></li> + +<li> +<a href="#control">Controlling Apache</a></li> +</ul> + +<hr> +<h2> +<a NAME="req"></a>Requirements</h2> +Apache 1.3 requires MPE/iX 6.0 or greater. It will NOT run on earlier +releases of MPE/iX. The following MPE/iX patches (or their superseding +descendants) are relevant to Apache: +<ul> +<li> +MPE/iX 6.0:</li> + +<ul> +<li> +MPEKXT3B - fixes an MPE bug that results in transient "permission denied" +errors being returned by the server to the browser.</li> + +<li> +MPELX36A - enhances the kill() function so that MPE users with SM capability +can send signals to Apache for shutdown, restart, etc.</li> + +<li> +MPELX44C - fixes an MPE bug that prevents DSO modules from being dynamically +loaded.</li> + +<li> +MPELX51C - enhances the kill() function so that Apache can use it when +the Apache parent UID is different from the Apache children UID (strongly +recommended).</li> + +<li> +NSTxxxxx - the latest network transport patch should always be installed +when using TCP/IP applications such as Apache.</li> +</ul> + +<li> +MPE/iX 6.5:</li> + +<ul> +<li> +MPELX44D - fixes an MPE bug that prevents DSO modules from being dynamically +loaded.</li> + +<li> +MPELX51D - enhances the kill() function so that Apache can use it when +the Apache parent UID is different from the Apache children UID (strongly +recommended).</li> + +<li> +NSTxxxxx - the latest network transport patch should always be installed +when using TCP/IP applications such as Apache.</li> +</ul> +</ul> + +<h2> + +<hr WIDTH="100%"></h2> + +<h2> +<a NAME="implement"></a>Implementation Considerations</h2> +While MPE has a very good POSIX implementation that enables fairly simple +porting of Unix applications such as Apache, there are some Unix concepts +which just don't exist or aren't fully implemented in MPE, and so this +may force some functionality changes in the package being ported. +<h3> +Significant MPE vs. Unix OS differences</h3> + +<ul> +<li> +MPE lacks the concept of a Unix UID=0 root user with special privileges. +Where Unix functions require a user to be executing as root, MPE requires +the user to be executing in priv mode, so the program file must be linked +with PM (Priv Mode) capability, and the Unix function calls must be bracketed +by GETPRIVMODE() and GETUSERMODE() calls. The following Unix functions +used by Apache are affected:</li> + +<ul> +<li> +bind() for ports less than 1024</li> + +<li> +setgid()</li> + +<li> +setuid()</li> +</ul> + +<li> +MPE's support for UIDs and GIDs is more limited than Unix. Every +MPE account maps to a unique GID. Each MPE account can contain multiple +MPE users, and every MPE user maps to a unique UID (UID 0 is not supported). +The current UID for a process must correspond to an MPE user within the +MPE account that corresponds to the current GID of the process.</li> + +<li> +MPE child processes cannot survive the death of their parent. When +the parent terminates, any remaining children will be killed.</li> + +<li> +MPE doesn't initialize the envp parameter when invoking the main() of a +new process. Use the global variable environ instead of envp.</li> + +<li> +MPE link() exists, but always returns EIMPL. Use rename() or symlinks +instead of hard links.</li> + +<li> +MPE doesn't allow the @ character in filenames.</li> + +<li> +MPE lacks support for TCP_NODELAY, but that's the default anyway.</li> + +<li> +MPE lacks support for SO_KEEPALIVE.</li> + +<li> +MPE lacks support for process groups.</li> + +<li> +MPE inetd only passes stdin (and NOT stdout) to the invoked service. +But you can write to stdin just fine.</li> +</ul> + +<h3> +Major Apache functionality issues</h3> + +<ul> +<li> +Beginning with HP-supported Apache 1.3.9 and HP WebWise MPE/iX Secure Web +Server A.01.00 (based on Apache 1.3.9), the User and Group directives in +httpd.conf are now unconditionally executed as corresponding setuid()/setgid() +calls. Previously this was only done if HTTPD was being run as MANAGER.SYS. +This functionality change was submitted back to the 1.3.13-dev source tree +at www.apache.org. The Apache for Unix behavior is to only honor +User and Group if running as root.</li> + +<li> +Beginning with HP-supported Apache 1.3.9 and HP WebWise MPE/iX Secure Web +Server A.01.00 (based on Apache 1.3.9), the SVIPC shared memory macros +SHM_R and SHM_W have been modified from their traditional owner-only-read +and owner-only-write values to be owner-and-group-read and owner-and-group-write +on MPE/iX in order to allow increased parent/child flexibility in spite +of MPE's limited POSIX UID/GID support. This functionality change +was submitted back to the 1.3.13-dev source tree at www.apache.org. +The Apache for Unix behavior uses the traditional owner-only values of +SHM_R and SHM_W.</li> +</ul> + +<h3> +Minor Apache functionality issues</h3> + +<ul> +<li> +Apache for Unix must be run as root to bind to TCP ports 1-1023. Apache +for MPE must call GETPRIVMODE() to bind to TCP ports 1-1023; PM is not +used for ports greater than 1023. The standard web server HTTP port is +80.</li> + +<li> +Apache for Unix in standalone mode will detach itself and run in the background +as a system-type process. Apache for MPE in standalone mode cannot detach +itself and run in the background because MPE POSIX doesn't allow this (the +detached child would be killed when the parent terminated). Therefore +you must use an MPE batch job to run Apache in standalone mode.</li> + +<li> +Apache for Unix uses process groups to manage child processes. Apache for +MPE cannot use process groups because MPE POSIX doesn't support this. The +implications of this are unknown.</li> + +<li> +Apache for Unix uses the setsockopt() option TCP_NODELAY. Apache for MPE +does not, because MPE doesn't support it. But TCP_NODELAY is the default +MPE behavior anyway.</li> + +<li> +Apache for Unix uses the setsockopt() option SO_KEEPALIVE. Apache +for MPE does not, because MPE doesn't support it.</li> + +<li> +Apache for Unix under inetd reads from the socket via stdin and writes +via stdout. Apache for MPE under inetd reads *AND* writes the socket via +stdin. I consider MPE 5.5 inetd to be broken and poorly documented, so +I submitted SR 5003355016 to address this. If HP ever alters the MPE inetd +to pass the socket the way HPUX inetd does (not likely in the grand scheme +of things), the existing Apache for MPE code will break.</li> + +<li> +Apache for Unix will use the @ character in proxy cache filenames, but +since @ is illegal in MPE filenames, Apache for MPE uses the % character +instead.</li> +</ul> + +<h2> + +<hr WIDTH="100%"></h2> + +<h2> +<a NAME="binaries"></a>Binary Distributions</h2> +HP ships a fully supported Apache binary distribution with the Fundamental +Operating System (FOS) in MPE/iX 6.5 and later. This distribution +can be found in the APACHE account. +<p>HP supplies fully supported Apache binary distributions for MPE/iX 6.0 +or later available for downloading from <a href="http://jazz.external.hp.com/src/apache/">http://jazz.external.hp.com/src/apache/</a>. +<p>Mark Bixby supplies Apache binary distributions for MPE/iX available +for downloading from <a href="http://www.bixby.org/mark/apacheix.html">http://www.bixby.org/mark/apacheix.html</a>. +Binaries from bixby.org are NOT supported by HP. HP only supports +binaries distributed by HP. +<p>All of the binary distributions mentioned above may possibly include +functionality that hasn't yet been submitted back to the Apache Software +Foundation (though submitting back is the intended goal). Please +read the documentation that comes with these binaries in order to determine +functionality differences (if any) compared to the latest sources available +from the ASF. +<p>If you will be using one of these binary distributions, please stop +reading this document and start reading the specific distribution documentation +for installation details. +<h2> + +<hr WIDTH="100%"></h2> + +<h2> +<a NAME="accounting"></a>Create the Accounting Structure</h2> +Apache can be installed under the account of your choice. For the +purposes of this document, the APACHE account will be used: +<ol> +<li> +<tt><font size=+1>:HELLO MANAGER.SYS</font></tt></li> + +<li> +<tt><font size=+1>:NEWACCT APACHE,MGR</font></tt></li> + +<li> +<tt><font size=+1>:ALTACCT APACHE;PASS=xxxxxxxx;CAP=AM,AL,ND,SF,BA,IA,PM,PH</font></tt></li> + +<li> +<tt><font size=+1>:ALTGROUP PUB.APACHE;CAP=BA,IA,PM,PH;ACCESS=(R,L,X:AC;W,A,S:AL)</font></tt></li> + +<li> +<tt><font size=+1>:ALTUSER MGR.APACHE;CAP=AM,AL,ND,SF,BA,IA,PM,PH;HOME=PUB</font></tt></li> + +<li> +<tt><font size=+1>:NEWUSER SERVER.APACHE</font></tt></li> + +<li> +<tt><font size=+1>:ALTUSER SERVER.APACHE;CAP=ND,SF,BA,IA,PH;HOME=PUB</font></tt></li> +</ol> + +<h2> +<a NAME="down"></a>Downloading Apache</h2> +Use your web browser to download the Apache source tarball from <a href="http://www.apache.org/dist/">http://www.apache.org/dist/</a>. +Then ftp upload the tarball to your e3000 as show below: +<pre>C:\Temp>ftp 3000.host.name +Connected to 3000.host.name. +220 HP ARPA FTP Server [A0009H09] (C) Hewlett-Packard Co. 1990 +User (3000.host.name:(none)): MGR.APACHE +331 Password required for MGR.APACHE. Syntax: acctpass +Password:xxxxxxxx +230 User logged on +ftp> quote type L 8 +200 Type set to L (byte size 8). +ftp> put apache_v.u.ff.tar.Z /tmp/apache.tar.Z +200 PORT command ok. +150 File: /tmp/apache.tar.Z opened; data connection will be opened +226 Transfer complete. +ftp: 2685572 bytes sent in 2.75Seconds 976.57Kbytes/sec. +ftp> quit +221 Server is closing command connection</pre> +Unpack the tarball: +<ol> +<li> +<tt>:HELLO MGR.APACHE</tt></li> + +<li> +<tt>:XEQ SH.HPBIN.SYS -L</tt></li> + +<li> +<tt>$ mkdir src</tt></li> + +<li> +<tt>$ chmod 700 src</tt></li> + +<li> +<tt>$ cd src</tt></li> + +<li> +<tt>$ tar xvfopz /tmp/apache.tar.Z</tt></li> +</ol> + +<h2> +<a NAME="compile"></a>Compiling Apache</h2> +It is STRONGLY recommended to use gcc instead of the HP C/iX compiler. +You can obtain gcc from <a href="http://jazz.external.hp.com/src/gnu/gnuframe.html">http://jazz.external.hp.com/src/gnu/gnuframe.html</a>. +<ol> +<li> +<tt>$ cd apache_v.uu.ff</tt></li> + +<li> +<tt>$ ./configure --prefix=/APACHE/PUB --enable-module=xxx --enable-module=yyy +...etc...</tt></li> + +<li> +<tt>$ make</tt></li> +</ol> + +<h2> +<a NAME="inst"></a>Installing Apache</h2> + +<ol> +<li> +<tt>$ make install</tt></li> + +<li> +<tt>$ cd /APACHE/PUB</tt></li> + +<li> +<tt>$ mv bin/httpd HTTPD</tt></li> + +<li> +<tt>$ ln -s HTTPD bin/httpd</tt></li> + +<li> +<tt>$ callci "xeq linkedit.pub.sys 'altprog HTTPD;cap=ia,ba,ph,pm'"</tt></li> +</ol> + +<h2> +<a NAME="config"></a>Configuring Apache</h2> +Edit /APACHE/PUB/conf/httpd.conf and customize as needed for your environment. +Be sure to make the following mandatory changes: +<ul> +<li> +User SERVER.APACHE</li> + +<li> +Group APACHE</li> +</ul> + +<h2> +<a NAME="run"></a>Running Apache</h2> +Simply create and :STREAM the following standalone server job in order +to start Apache: +<pre>!JOB JHTTPD,MGR.APACHE;OUTCLASS=,2 +!XEQ SH.HPBIN.SYS "-c 'umask 007; ./HTTPD -f /APACHE/PUB/conf/httpd.conf'" +!eoj</pre> + +<h2> +<a NAME="control"></a>Controlling Apache</h2> +Log on as MGR.APACHE (or MANAGER.SYS or any other SM user if you've installed +MPELX36A on 6.0) in order to shutdown or restart Apache via the use of +signals. +<p>To shut down Apache from the POSIX shell: +<pre>$ kill `cat /APACHE/PUB/logs/httpd.pid`</pre> +To shut down Apache from the CI: +<pre>:XEQ SH.HPBIN.SYS '-c "kill `cat /APACHE/PUB/logs/httpd.pid`"'</pre> +<HR> + <H3 ALIGN="CENTER"> + Apache HTTP Server + </H3> + +<A HREF="./"><IMG SRC="images/index.gif" ALT="Index"></A> + +</body> +</html> diff --git a/usr.sbin/httpd/htdocs/manual/new_features_2_0.html b/usr.sbin/httpd/htdocs/manual/new_features_2_0.html new file mode 100644 index 00000000000..711caf3b874 --- /dev/null +++ b/usr.sbin/httpd/htdocs/manual/new_features_2_0.html @@ -0,0 +1,66 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> +<HTML><HEAD> +<TITLE>New features with Apache 2.0</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 + </H3> +</DIV> + +<H1 ALIGN="CENTER">Overview of New Features in Apache 2.0</H1> + +<P>New features with this release, as extensions of the Apache +functionality. Because the core code has changed so +significantly, there are certain liberties that earlier versions of +Apache (and the NCSA daemon) took that recent Apache versions are +pickier about - when Apache 2.0 is released, there will be more notes +on how to correct those issues. + +<P>Enhancements: <A HREF="#core">Core</A> | +<A HREF="#performance">Performance</A> | +<A HREF="#config">Configuration</A> | +<A HREF="#mod">Modules</A> | +<A HREF="#api">API</A> | +<A HREF="#misc">Misc</A> + +<P><HR> + +<H2><A NAME="core">Core Enhancements:</A></H2> + +<DL> +<DT><STRONG>New Build System</STRONG> +<DD>The entire build system has been completely redesigned to take + advantage of autoconf and libtool. This makes it more likely that + DSO's will work on more systems. + +<DT><STRONG>Improved Portability</STRONG> +<DD>Apache now takes advantage of native system calls on all supported + platforms. This improves performance and reduces bugs. + +<DT><STRONG>Multi-Threading</STRONG> +<DD>Apache 2.0 has the option of being multi-process and multi-threaded + on most platforms. + +<DT><STRONG>Apache Portable Runtime</STRONG> +<DD>The Apache Portable Runtime allow Apache to easily port to more and more + systems. This has however caused a major code re-organization. +</DL> + +<P><HR> + +<HR> + <H3 ALIGN="CENTER"> + Apache HTTP Server + </H3> + +<A HREF="./"><IMG SRC="images/index.gif" ALT="Index"></A> + +</BODY> +</HTML> + diff --git a/usr.sbin/httpd/src/Apache.dsw b/usr.sbin/httpd/src/Apache.dsw new file mode 100644 index 00000000000..8c8265d9f74 --- /dev/null +++ b/usr.sbin/httpd/src/Apache.dsw @@ -0,0 +1,488 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Apache"=".\Apache.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name ApacheCore + End Project Dependency +}}} + +############################################################################### + +Project: "ApacheCore"=".\ApacheCore.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name ap + End Project Dependency + Begin Project Dependency + Project_Dep_Name ApacheOS + End Project Dependency + Begin Project Dependency + Project_Dep_Name gen_test_char + End Project Dependency + Begin Project Dependency + Project_Dep_Name gen_uri_delims + End Project Dependency + Begin Project Dependency + Project_Dep_Name regex + End Project Dependency +}}} + +############################################################################### + +Project: "ApacheModuleAuthAnon"=".\os\win32\ApacheModuleAuthAnon.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name ApacheCore + End Project Dependency +}}} + +############################################################################### + +Project: "ApacheModuleAuthDBM"=".\os\win32\ApacheModuleAuthDBM.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name ApacheCore + End Project Dependency + Begin Project Dependency + Project_Dep_Name sdbm + End Project Dependency +}}} + +############################################################################### + +Project: "ApacheModuleAuthDigest"=".\os\win32\ApacheModuleAuthDigest.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name ApacheCore + End Project Dependency +}}} + +############################################################################### + +Project: "ApacheModuleCERNMeta"=".\os\win32\ApacheModuleCERNMeta.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name ApacheCore + End Project Dependency +}}} + +############################################################################### + +Project: "ApacheModuleDigest"=".\os\win32\ApacheModuleDigest.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name ApacheCore + End Project Dependency +}}} + +############################################################################### + +Project: "ApacheModuleExpires"=".\os\win32\ApacheModuleExpires.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name ApacheCore + End Project Dependency +}}} + +############################################################################### + +Project: "ApacheModuleHeaders"=".\os\win32\ApacheModuleHeaders.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name ApacheCore + End Project Dependency +}}} + +############################################################################### + +Project: "ApacheModuleInfo"=".\os\win32\ApacheModuleInfo.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name ApacheCore + End Project Dependency +}}} + +############################################################################### + +Project: "ApacheModuleProxy"=".\modules\proxy\ApacheModuleProxy.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name ApacheCore + End Project Dependency +}}} + +############################################################################### + +Project: "ApacheModuleRewrite"=".\os\win32\ApacheModuleRewrite.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name ApacheCore + End Project Dependency +}}} + +############################################################################### + +Project: "ApacheModuleSpeling"=".\os\win32\ApacheModuleSpeling.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name ApacheCore + End Project Dependency +}}} + +############################################################################### + +Project: "ApacheModuleStatus"=".\os\win32\ApacheModuleStatus.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name ApacheCore + End Project Dependency +}}} + +############################################################################### + +Project: "ApacheModuleUserTrack"=".\os\win32\ApacheModuleUserTrack.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name ApacheCore + End Project Dependency +}}} + +############################################################################### + +Project: "ApacheOS"=".\os\win32\ApacheOS.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "InstallBin"=".\InstallBin.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name Apache + End Project Dependency + Begin Project Dependency + Project_Dep_Name ApacheCore + End Project Dependency + Begin Project Dependency + Project_Dep_Name ApacheModuleAuthAnon + End Project Dependency + Begin Project Dependency + Project_Dep_Name ApacheModuleAuthDigest + End Project Dependency + Begin Project Dependency + Project_Dep_Name ApacheModuleCERNMeta + End Project Dependency + Begin Project Dependency + Project_Dep_Name ApacheModuleDigest + End Project Dependency + Begin Project Dependency + Project_Dep_Name ApacheModuleExpires + End Project Dependency + Begin Project Dependency + Project_Dep_Name ApacheModuleHeaders + End Project Dependency + Begin Project Dependency + Project_Dep_Name ApacheModuleInfo + End Project Dependency + Begin Project Dependency + Project_Dep_Name ApacheModuleProxy + End Project Dependency + Begin Project Dependency + Project_Dep_Name ApacheModuleRewrite + End Project Dependency + Begin Project Dependency + Project_Dep_Name ApacheModuleSpeling + End Project Dependency + Begin Project Dependency + Project_Dep_Name ApacheModuleStatus + End Project Dependency + Begin Project Dependency + Project_Dep_Name ApacheModuleUserTrack + End Project Dependency + Begin Project Dependency + Project_Dep_Name htdigest + End Project Dependency + Begin Project Dependency + Project_Dep_Name htpasswd + End Project Dependency + Begin Project Dependency + Project_Dep_Name logresolve + End Project Dependency + Begin Project Dependency + Project_Dep_Name rotatelogs + End Project Dependency + Begin Project Dependency + Project_Dep_Name xmlparse + End Project Dependency + Begin Project Dependency + Project_Dep_Name ApacheModuleAuthDBM + End Project Dependency +}}} + +############################################################################### + +Project: "ap"=".\ap\ap.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "gen_test_char"=".\main\gen_test_char.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "gen_uri_delims"=".\main\gen_uri_delims.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "htdigest"=".\support\htdigest.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "htpasswd"=".\support\htpasswd.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "install"=".\os\win32\installer\installdll\install.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "logresolve"=".\support\logresolve.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "regex"=".\regex\regex.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "rotatelogs"=".\support\rotatelogs.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "sdbm"=".\lib\sdbm\sdbm.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "xmlparse"=".\lib\expat-lite\xmlparse.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name xmltok + End Project Dependency +}}} + +############################################################################### + +Project: "xmltok"=".\lib\expat-lite\xmltok.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/usr.sbin/httpd/src/InstallBin.dsp b/usr.sbin/httpd/src/InstallBin.dsp new file mode 100644 index 00000000000..947eba5ee54 --- /dev/null +++ b/usr.sbin/httpd/src/InstallBin.dsp @@ -0,0 +1,109 @@ +# Microsoft Developer Studio Project File - Name="InstallBin" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) External Target" 0x0106 + +CFG=InstallBin - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "InstallBin.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "InstallBin.mak" CFG="InstallBin - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "InstallBin - Win32 Release" (based on "Win32 (x86) External Target") +!MESSAGE "InstallBin - Win32 Debug" (based on "Win32 (x86) External Target") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" + +!IF "$(CFG)" == "InstallBin - Win32 Release" + +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Cmd_Line "NMAKE /f InstallBin.mak" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "InstallBin.exe" +# PROP BASE Bsc_Name "InstallBin.bsc" +# PROP BASE Target_Dir "" +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Cmd_Line "NMAKE /f makefile.win INSTDIR=.. SHORT=R LONG=Release _install" +# PROP Rebuild_Opt "" +# PROP Target_File "..\Apache.exe" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "InstallBin - Win32 Debug" + +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Cmd_Line "NMAKE /f InstallBin.mak" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "InstallBin.exe" +# PROP BASE Bsc_Name "InstallBin.bsc" +# PROP BASE Target_Dir "" +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Cmd_Line "NMAKE /f makefile.win INSTDIR=.. SHORT=D LONG=Debug _install" +# PROP Rebuild_Opt "" +# PROP Target_File "..\Apache.exe" +# PROP Bsc_Name ".\apache.bsc" +# PROP Target_Dir "" + +!ENDIF + +# Begin Target + +# Name "InstallBin - Win32 Release" +# Name "InstallBin - Win32 Debug" + +!IF "$(CFG)" == "InstallBin - Win32 Release" + +!ELSEIF "$(CFG)" == "InstallBin - Win32 Debug" + +!ENDIF + +# Begin Source File + +SOURCE=..\logs\access.log +# End Source File +# Begin Source File + +SOURCE=.\os\win32\BaseAddr.ref +# End Source File +# Begin Source File + +SOURCE=.\CHANGES +# End Source File +# Begin Source File + +SOURCE=..\logs\error.log +# End Source File +# Begin Source File + +SOURCE=..\conf\httpd.conf +# End Source File +# Begin Source File + +SOURCE=.\Makefile.win +# End Source File +# Begin Source File + +SOURCE=..\STATUS +# End Source File +# End Target +# End Project diff --git a/usr.sbin/httpd/src/helpers/cvstodsp5.pl b/usr.sbin/httpd/src/helpers/cvstodsp5.pl new file mode 100644 index 00000000000..cf2d167c96b --- /dev/null +++ b/usr.sbin/httpd/src/helpers/cvstodsp5.pl @@ -0,0 +1,43 @@ +use IO::File; +use File::Find; + +chdir '..'; +find(\&tovc5, '.'); + +sub tovc5 { + + if (m|.dsp$|) { + $oname = $_; + $tname = '.#' . $_; + $verchg = 0; + $srcfl = new IO::File $oname, "r" || die; + $dstfl = new IO::File $tname, "w" || die; + while ($src = <$srcfl>) { + if ($src =~ s|Format Version 6\.00|Format Version 5\.00|) { + $verchg = -1; + } + if ($src =~ s|^(# ADD CPP .*)/ZI (.*)|$1/Zi $2|) { + $verchg = -1; + } + if ($src =~ s|^(# ADD BASE CPP .*)/ZI (.*)|$1/Zi $2|) { + $verchg = -1; + } + if ($src !~ m|^# PROP AllowPerConfigDependencies|) { + print $dstfl $src; } + else { + $verchg = -1; + + } + } + undef $srcfl; + undef $dstfl; + if ($verchg) { + unlink $oname || die; + rename $tname, $oname || die; + print "Converted VC6 project " . $oname . " to VC5 in " . $File::Find::dir . "\n"; + } + else { + unlink $tname; + } + } +} diff --git a/usr.sbin/httpd/src/helpers/dsp5tocvs.pl b/usr.sbin/httpd/src/helpers/dsp5tocvs.pl new file mode 100644 index 00000000000..9686b43634b --- /dev/null +++ b/usr.sbin/httpd/src/helpers/dsp5tocvs.pl @@ -0,0 +1,46 @@ +use IO::File; +use File::Find; + +chdir '..'; +find(\&tovc6, '.'); + +sub tovc6 { + + if (m|.dsp$|) { + $oname = $_; + $tname = '.#' . $_; + $verchg = 0; + $srcfl = new IO::File $_, "r" || die; + $dstfl = new IO::File $tname, "w" || die; + while ($src = <$srcfl>) { + if ($src =~ s|Format Version 5\.00|Format Version 6\.00|) { + $verchg = -1; + } + if ($src =~ s|^(# ADD CPP .*)/Zi (.*)|$1/ZI $2|) { + $verchg = -1; + } + if ($src =~ s|^(# ADD BASE CPP .*)/Zi (.*)|$1/ZI $2|) { + $verchg = -1; + } + if ($src =~ s|^(!MESSAGE .*)\\\n|$1|) { + $cont = <$srcfl>; + $src = $src . $cont; + $verchg = -1; + } + print $dstfl $src; + if ($verchg && $src =~ m|^# Begin Project|) { + print $dstfl "# PROP AllowPerConfigDependencies 0\n"; + } + } + undef $srcfl; + undef $dstfl; + if ($verchg) { + unlink $oname || die; + rename $tname, $oname || die; + print "Converted VC5 project " . $oname . " to VC6 in " . $File::Find::dir . "\n"; + } + else { + unlink $tname; + } + } +} diff --git a/usr.sbin/httpd/src/include/ap_alloc.h b/usr.sbin/httpd/src/include/ap_alloc.h new file mode 100644 index 00000000000..286d4e7342a --- /dev/null +++ b/usr.sbin/httpd/src/include/ap_alloc.h @@ -0,0 +1,415 @@ +/* ==================================================================== + * Copyright (c) 1995-1999 The Apache Group. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the Apache Group + * for use in the Apache HTTP server project (http://www.apache.org/)." + * + * 4. The names "Apache Server" and "Apache Group" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache" + * nor may "Apache" appear in their names without prior written + * permission of the Apache Group. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the Apache Group + * for use in the Apache HTTP server project (http://www.apache.org/)." + * + * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Group and was originally based + * on public domain software written at the National Center for + * Supercomputing Applications, University of Illinois, Urbana-Champaign. + * For more information on the Apache Group and the Apache HTTP server + * project, please see <http://www.apache.org/>. + * + */ + +#ifndef APACHE_ALLOC_H +#define APACHE_ALLOC_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Resource allocation routines... + * + * designed so that we don't have to keep track of EVERYTHING so that + * it can be explicitly freed later (a fundamentally unsound strategy --- + * particularly in the presence of die()). + * + * Instead, we maintain pools, and allocate items (both memory and I/O + * handlers) from the pools --- currently there are two, one for per + * transaction info, and one for config info. When a transaction is over, + * we can delete everything in the per-transaction pool without fear, and + * without thinking too hard about it either. + * + * rst + */ + +/* Arenas for configuration info and transaction info + * --- actual layout of the pool structure is private to + * alloc.c. + */ + + /* Need declaration of DIR on Win32 */ +#ifdef WIN32 +#include "../os/win32/readdir.h" +#endif + +typedef struct pool pool; +typedef struct pool ap_pool; + +pool * ap_init_alloc(void); /* Set up everything */ +void ap_cleanup_alloc(void); +API_EXPORT(pool *) ap_make_sub_pool(pool *); /* All pools are subpools of permanent_pool */ +#if defined(EAPI) +typedef enum { AP_POOL_RD, AP_POOL_RW } ap_pool_lock_mode; +int ap_shared_pool_possible(void); +void ap_init_alloc_shared(int); +void ap_kill_alloc_shared(void); +API_EXPORT(pool *) ap_make_shared_sub_pool(pool *); +API_EXPORT(int) ap_acquire_pool(pool *, ap_pool_lock_mode); +API_EXPORT(int) ap_release_pool(pool *); +#endif +API_EXPORT(void) ap_destroy_pool(pool *); + +/* pools have nested lifetimes -- sub_pools are destroyed when the + * parent pool is cleared. We allow certain liberties with operations + * on things such as tables (and on other structures in a more general + * sense) where we allow the caller to insert values into a table which + * were not allocated from the table's pool. The table's data will + * remain valid as long as all the pools from which its values are + * allocated remain valid. + * + * For example, if B is a sub pool of A, and you build a table T in + * pool B, then it's safe to insert data allocated in A or B into T + * (because B lives at most as long as A does, and T is destroyed when + * B is cleared/destroyed). On the other hand, if S is a table in + * pool A, it is safe to insert data allocated in A into S, but it + * is *not safe* to insert data allocated from B into S... because + * B can be cleared/destroyed before A is (which would leave dangling + * pointers in T's data structures). + * + * In general we say that it is safe to insert data into a table T + * if the data is allocated in any ancestor of T's pool. This is the + * basis on which the POOL_DEBUG code works -- it tests these ancestor + * relationships for all data inserted into tables. POOL_DEBUG also + * provides tools (ap_find_pool, and ap_pool_is_ancestor) for other + * folks to implement similar restrictions for their own data + * structures. + * + * However, sometimes this ancestor requirement is inconvenient -- + * sometimes we're forced to create a sub pool (such as through + * ap_sub_req_lookup_uri), and the sub pool is guaranteed to have + * the same lifetime as the parent pool. This is a guarantee implemented + * by the *caller*, not by the pool code. That is, the caller guarantees + * they won't destroy the sub pool individually prior to destroying the + * parent pool. + * + * In this case the caller must call ap_pool_join() to indicate this + * guarantee to the POOL_DEBUG code. There are a few examples spread + * through the standard modules. + */ +#ifndef POOL_DEBUG +#ifdef ap_pool_join +#undef ap_pool_join +#endif +#define ap_pool_join(a,b) +#else +API_EXPORT(void) ap_pool_join(pool *p, pool *sub); +API_EXPORT(pool *) ap_find_pool(const void *ts); +API_EXPORT(int) ap_pool_is_ancestor(pool *a, pool *b); +#endif + +/* Clearing out EVERYTHING in an pool... destroys any sub-pools */ + +API_EXPORT(void) ap_clear_pool(struct pool *); + +/* Preparing for exec() --- close files, etc., but *don't* flush I/O + * buffers, *don't* wait for subprocesses, and *don't* free any memory. + */ + +API_EXPORT(void) ap_cleanup_for_exec(void); + +/* routines to allocate memory from an pool... */ + +API_EXPORT(void *) ap_palloc(struct pool *, int nbytes); +API_EXPORT(void *) ap_pcalloc(struct pool *, int nbytes); +API_EXPORT(char *) ap_pstrdup(struct pool *, const char *s); +/* make a nul terminated copy of the n characters starting with s */ +API_EXPORT(char *) ap_pstrndup(struct pool *, const char *s, int n); +API_EXPORT_NONSTD(char *) ap_pstrcat(struct pool *,...); /* all '...' must be char* */ +API_EXPORT_NONSTD(char *) ap_psprintf(struct pool *, const char *fmt, ...) + __attribute__((format(printf,2,3))); +API_EXPORT(char *) ap_pvsprintf(struct pool *, const char *fmt, va_list); + +/* array and alist management... keeping lists of things. + * Common enough to want common support code ... + */ + +typedef struct { + ap_pool *pool; + int elt_size; + int nelts; + int nalloc; + char *elts; +} array_header; + +API_EXPORT(array_header *) ap_make_array(pool *p, int nelts, int elt_size); +API_EXPORT(void *) ap_push_array(array_header *); +API_EXPORT(void) ap_array_cat(array_header *dst, const array_header *src); +API_EXPORT(array_header *) ap_append_arrays(pool *, const array_header *, + const array_header *); + +/* ap_array_pstrcat generates a new string from the pool containing + * the concatenated sequence of substrings referenced as elements within + * the array. The string will be empty if all substrings are empty or null, + * or if there are no elements in the array. + * If sep is non-NUL, it will be inserted between elements as a separator. + */ +API_EXPORT(char *) ap_array_pstrcat(pool *p, const array_header *arr, + const char sep); + +/* copy_array copies the *entire* array. copy_array_hdr just copies + * the header, and arranges for the elements to be copied if (and only + * if) the code subsequently does a push or arraycat. + */ + +API_EXPORT(array_header *) ap_copy_array(pool *p, const array_header *src); +API_EXPORT(array_header *) ap_copy_array_hdr(pool *p, const array_header *src); + + +/* Tables. Implemented alist style, for now, though we try to keep + * it so that imposing a hash table structure on top in the future + * wouldn't be *too* hard... + * + * Note that key comparisons for these are case-insensitive, largely + * because that's what's appropriate and convenient everywhere they're + * currently being used... + */ + +typedef struct table table; + +typedef struct { + char *key; /* maybe NULL in future; + * check when iterating thru table_elts + */ + char *val; +} table_entry; + +API_EXPORT(table *) ap_make_table(pool *p, int nelts); +API_EXPORT(table *) ap_copy_table(pool *p, const table *); +API_EXPORT(void) ap_clear_table(table *); +API_EXPORT(const char *) ap_table_get(const table *, const char *); +API_EXPORT(void) ap_table_set(table *, const char *name, const char *val); +API_EXPORT(void) ap_table_setn(table *, const char *name, const char *val); +API_EXPORT(void) ap_table_merge(table *, const char *name, const char *more_val); +API_EXPORT(void) ap_table_mergen(table *, const char *name, const char *more_val); +API_EXPORT(void) ap_table_unset(table *, const char *key); +API_EXPORT(void) ap_table_add(table *, const char *name, const char *val); +API_EXPORT(void) ap_table_addn(table *, const char *name, const char *val); +API_EXPORT(void) ap_table_do(int (*comp) (void *, const char *, const char *), void *rec, + const table *t,...); + +API_EXPORT(table *) ap_overlay_tables(pool *p, const table *overlay, const table *base); + +/* Conceptually, ap_overlap_tables does this: + + array_header *barr = ap_table_elts(b); + table_entry *belt = (table_entry *)barr->elts; + int i; + + for (i = 0; i < barr->nelts; ++i) { + if (flags & AP_OVERLAP_TABLES_MERGE) { + ap_table_mergen(a, belt[i].key, belt[i].val); + } + else { + ap_table_setn(a, belt[i].key, belt[i].val); + } + } + + Except that it is more efficient (less space and cpu-time) especially + when b has many elements. + + Notice the assumptions on the keys and values in b -- they must be + in an ancestor of a's pool. In practice b and a are usually from + the same pool. +*/ +#define AP_OVERLAP_TABLES_SET (0) +#define AP_OVERLAP_TABLES_MERGE (1) +API_EXPORT(void) ap_overlap_tables(table *a, const table *b, unsigned flags); + +/* XXX: these know about the definition of struct table in alloc.c. That + * definition is not here because it is supposed to be private, and by not + * placing it here we are able to get compile-time diagnostics from modules + * written which assume that a table is the same as an array_header. -djg + */ +#define ap_table_elts(t) ((array_header *)(t)) +#define ap_is_empty_table(t) (((t) == NULL)||(((array_header *)(t))->nelts == 0)) + +/* routines to remember allocation of other sorts of things... + * generic interface first. Note that we want to have two separate + * cleanup functions in the general case, one for exec() preparation, + * to keep CGI scripts and the like from inheriting access to things + * they shouldn't be able to touch, and one for actually cleaning up, + * when the actual server process wants to get rid of the thing, + * whatever it is. + * + * kill_cleanup disarms a cleanup, presumably because the resource in + * question has been closed, freed, or whatever, and it's scarce + * enough to want to reclaim (e.g., descriptors). It arranges for the + * resource not to be cleaned up a second time (it might have been + * reallocated). run_cleanup does the same, but runs it first. + * + * Cleanups are identified for purposes of finding & running them off by the + * plain_cleanup and data, which should presumably be unique. + * + * NB any code which invokes register_cleanup or kill_cleanup directly + * is a critical section which should be guarded by block_alarms() and + * unblock_alarms() below... + */ + +API_EXPORT(void) ap_register_cleanup(pool *p, void *data, + void (*plain_cleanup) (void *), + void (*child_cleanup) (void *)); + +API_EXPORT(void) ap_kill_cleanup(pool *p, void *data, void (*plain_cleanup) (void *)); +API_EXPORT(void) ap_run_cleanup(pool *p, void *data, void (*cleanup) (void *)); + +/* A "do-nothing" cleanup, for register_cleanup; it's faster to do + * things this way than to test for NULL. */ +API_EXPORT_NONSTD(void) ap_null_cleanup(void *data); + +/* The time between when a resource is actually allocated, and when it + * its cleanup is registered is a critical section, during which the + * resource could leak if we got interrupted or timed out. So, anything + * which registers cleanups should bracket resource allocation and the + * cleanup registry with these. (This is done internally by run_cleanup). + * + * NB they are actually implemented in http_main.c, since they are bound + * up with timeout handling in general... + */ + +#ifdef TPF +#define ap_block_alarms() (0) +#define ap_unblock_alarms() (0) +#else +API_EXPORT(void) ap_block_alarms(void); +API_EXPORT(void) ap_unblock_alarms(void); +#endif /* TPF */ + +/* Common cases which want utility support.. + * the note_cleanups_for_foo routines are for + */ + +API_EXPORT(FILE *) ap_pfopen(struct pool *, const char *name, const char *fmode); +API_EXPORT(FILE *) ap_pfdopen(struct pool *, int fd, const char *fmode); +API_EXPORT(int) ap_popenf(struct pool *, const char *name, int flg, int mode); + +API_EXPORT(void) ap_note_cleanups_for_file(pool *, FILE *); +API_EXPORT(void) ap_note_cleanups_for_fd(pool *, int); +#ifdef WIN32 +API_EXPORT(void) ap_note_cleanups_for_h(pool *, HANDLE); +#endif +API_EXPORT(void) ap_kill_cleanups_for_fd(pool *p, int fd); + +API_EXPORT(void) ap_note_cleanups_for_socket(pool *, int); +API_EXPORT(void) ap_kill_cleanups_for_socket(pool *p, int sock); +API_EXPORT(int) ap_psocket(pool *p, int, int, int); +API_EXPORT(int) ap_pclosesocket(pool *a, int sock); + +API_EXPORT(regex_t *) ap_pregcomp(pool *p, const char *pattern, int cflags); +API_EXPORT(void) ap_pregfree(pool *p, regex_t * reg); + +/* routines to note closes... file descriptors are constrained enough + * on some systems that we want to support this. + */ + +API_EXPORT(int) ap_pfclose(struct pool *, FILE *); +API_EXPORT(int) ap_pclosef(struct pool *, int fd); +#ifdef WIN32 +API_EXPORT(int) ap_pcloseh(struct pool *, HANDLE hDevice); +#endif + +/* routines to deal with directories */ +API_EXPORT(DIR *) ap_popendir(pool *p, const char *name); +API_EXPORT(void) ap_pclosedir(pool *p, DIR * d); + +/* ... even child processes (which we may want to wait for, + * or to kill outright, on unexpected termination). + * + * ap_spawn_child is a utility routine which handles an awful lot of + * the rigamarole associated with spawning a child --- it arranges + * for pipes to the child's stdin and stdout, if desired (if not, + * set the associated args to NULL). It takes as args a function + * to call in the child, and an argument to be passed to the function. + */ + +enum kill_conditions { + kill_never, /* process is never sent any signals */ + kill_always, /* process is sent SIGKILL on pool cleanup */ + kill_after_timeout, /* SIGTERM, wait 3 seconds, SIGKILL */ + just_wait, /* wait forever for the process to complete */ + kill_only_once /* send SIGTERM and then wait */ +}; + +typedef struct child_info child_info; +API_EXPORT(void) ap_note_subprocess(pool *a, pid_t pid, + enum kill_conditions how); +API_EXPORT(int) ap_spawn_child(pool *, int (*)(void *, child_info *), + void *, enum kill_conditions, + FILE **pipe_in, FILE **pipe_out, + FILE **pipe_err); + +/* magic numbers --- min free bytes to consider a free pool block useable, + * and the min amount to allocate if we have to go to malloc() */ + +#ifndef BLOCK_MINFREE +#define BLOCK_MINFREE 4096 +#endif +#ifndef BLOCK_MINALLOC +#define BLOCK_MINALLOC 8192 +#endif + +/* Finally, some accounting */ + +API_EXPORT(long) ap_bytes_in_pool(pool *p); +API_EXPORT(long) ap_bytes_in_free_blocks(void); + +#ifdef __cplusplus +} +#endif + +#endif /* !APACHE_ALLOC_H */ diff --git a/usr.sbin/httpd/src/lib/expat-lite/xmlparse.imp b/usr.sbin/httpd/src/lib/expat-lite/xmlparse.imp new file mode 100644 index 00000000000..af401a5c0d1 --- /dev/null +++ b/usr.sbin/httpd/src/lib/expat-lite/xmlparse.imp @@ -0,0 +1,34 @@ +XML_DefaultCurrent +XML_ErrorString +XML_ExternalEntityParserCreate +XML_GetBase +XML_GetBuffer +XML_GetCurrentByteCount +XML_GetCurrentByteIndex +XML_GetCurrentColumnNumber +XML_GetCurrentLineNumber +XML_GetErrorCode +XML_GetSpecifiedAttributeCount +XML_Parse +XML_ParseBuffer +XML_ParserCreate +XML_ParserCreateNS +XML_ParserFree +XML_SetBase +XML_SetCdataSectionHandler +XML_SetCharacterDataHandler +XML_SetCommentHandler +XML_SetDefaultHandler +XML_SetDefaultHandlerExpand +XML_SetElementHandler +XML_SetEncoding +XML_SetExternalEntityRefHandler +XML_SetExternalEntityRefHandlerArg +XML_SetNamespaceDeclHandler +XML_SetNotStandaloneHandler +XML_SetNotationDeclHandler +XML_SetProcessingInstructionHandler +XML_SetUnknownEncodingHandler +XML_SetUnparsedEntityDeclHandler +XML_SetUserData +XML_UseParserAsHandlerArg diff --git a/usr.sbin/httpd/src/lib/expat-lite/xmlparsenw.def b/usr.sbin/httpd/src/lib/expat-lite/xmlparsenw.def new file mode 100644 index 00000000000..ab0141987f3 --- /dev/null +++ b/usr.sbin/httpd/src/lib/expat-lite/xmlparsenw.def @@ -0,0 +1,2 @@ +MODULE xmltok +EXPORT @xmlparse.imp diff --git a/usr.sbin/httpd/src/lib/expat-lite/xmltok.imp b/usr.sbin/httpd/src/lib/expat-lite/xmltok.imp new file mode 100644 index 00000000000..4b672760d99 --- /dev/null +++ b/usr.sbin/httpd/src/lib/expat-lite/xmltok.imp @@ -0,0 +1,9 @@ +XmlGetUtf16InternalEncoding +XmlGetUtf8InternalEncoding +XmlInitEncoding +XmlInitUnknownEncoding +XmlParseXmlDecl +XmlPrologStateInit +XmlSizeOfUnknownEncoding +XmlUtf16Encode +XmlUtf8Encode diff --git a/usr.sbin/httpd/src/lib/expat-lite/xmltoknw.def b/usr.sbin/httpd/src/lib/expat-lite/xmltoknw.def new file mode 100644 index 00000000000..093cda90411 --- /dev/null +++ b/usr.sbin/httpd/src/lib/expat-lite/xmltoknw.def @@ -0,0 +1 @@ +EXPORT @xmltok.imp diff --git a/usr.sbin/httpd/src/lib/sdbm/sdbm.c b/usr.sbin/httpd/src/lib/sdbm/sdbm.c new file mode 100644 index 00000000000..034f712923a --- /dev/null +++ b/usr.sbin/httpd/src/lib/sdbm/sdbm.c @@ -0,0 +1,511 @@ +/* + * sdbm - ndbm work-alike hashed database library + * based on Per-Aake Larson's Dynamic Hashing algorithms. BIT 18 (1978). + * author: oz@nexus.yorku.ca + * status: public domain. + * + * core routines + */ + +#include "sdbm.h" +#include "sdbm_tune.h" +#include "sdbm_pair.h" + +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <errno.h> +#include <string.h> +#include <stdlib.h> +#ifdef WIN32 +#include <io.h> +#include <stdio.h> +#else +#include <unistd.h> /* for lseek() */ +#endif + + +/* + * forward + */ +static int getdbit proto((DBM *, long)); +static int setdbit proto((DBM *, long)); +static int getpage proto((DBM *, long)); +static datum getnext proto((DBM *)); +static int makroom proto((DBM *, long, int)); + +/* + * useful macros + */ +#define bad(x) ((x).dptr == NULL || (x).dsize <= 0) +#define exhash(item) sdbm_hash((item).dptr, (item).dsize) +#define ioerr(db) ((db)->flags |= DBM_IOERR) + +#define OFF_PAG(off) (long) (off) * PBLKSIZ +#define OFF_DIR(off) (long) (off) * DBLKSIZ + +static long masks[] = { + 000000000000, 000000000001, 000000000003, 000000000007, + 000000000017, 000000000037, 000000000077, 000000000177, + 000000000377, 000000000777, 000000001777, 000000003777, + 000000007777, 000000017777, 000000037777, 000000077777, + 000000177777, 000000377777, 000000777777, 000001777777, + 000003777777, 000007777777, 000017777777, 000037777777, + 000077777777, 000177777777, 000377777777, 000777777777, + 001777777777, 003777777777, 007777777777, 017777777777 +}; + +datum nullitem = {NULL, 0}; + +DBM * +sdbm_open(file, flags, mode) +register char *file; +register int flags; +register int mode; +{ + register DBM *db; + register char *dirname; + register char *pagname; + register int n; + + if (file == NULL || !*file) + return errno = EINVAL, (DBM *) NULL; +/* + * need space for two seperate filenames + */ + n = strlen(file) * 2 + strlen(DIRFEXT) + strlen(PAGFEXT) + 2; + + if ((dirname = malloc((unsigned) n)) == NULL) + return errno = ENOMEM, (DBM *) NULL; +/* + * build the file names + */ + dirname = strcat(strcpy(dirname, file), DIRFEXT); + pagname = strcpy(dirname + strlen(dirname) + 1, file); + pagname = strcat(pagname, PAGFEXT); + + db = sdbm_prep(dirname, pagname, flags, mode); + free((char *) dirname); + return db; +} + +DBM * +sdbm_prep(dirname, pagname, flags, mode) +char *dirname; +char *pagname; +int flags; +int mode; +{ + register DBM *db; + struct stat dstat; + + if ((db = (DBM *) malloc(sizeof(DBM))) == NULL) + return errno = ENOMEM, (DBM *) NULL; + + db->flags = 0; + db->hmask = 0; + db->blkptr = 0; + db->keyptr = 0; +/* + * adjust user flags so that WRONLY becomes RDWR, + * as required by this package. Also set our internal + * flag for RDONLY if needed. + */ + if (flags & O_WRONLY) + flags = (flags & ~O_WRONLY) | O_RDWR; + + else if ((flags & 03) == O_RDONLY) + db->flags = DBM_RDONLY; +/* + * open the files in sequence, and stat the dirfile. + * If we fail anywhere, undo everything, return NULL. + */ +#if defined(OS2) || defined(MSDOS) || defined(WIN32) + flags |= O_BINARY; +#endif + if ((db->pagf = open(pagname, flags, mode)) > -1) { + if ( sdbm_fd_lock(db->pagf, sdbm_rdonly(db)) > -1 ) { + if ((db->dirf = open(dirname, flags, mode)) > -1) { +/* + * need the dirfile size to establish max bit number. + */ + if (fstat(db->dirf, &dstat) == 0) { +/* + * zero size: either a fresh database, or one with a single, + * unsplit data page: dirpage is all zeros. + */ + db->dirbno = (!dstat.st_size) ? 0 : -1; + db->pagbno = -1; + db->maxbno = dstat.st_size * BYTESIZ; + + (void) memset(db->pagbuf, 0, PBLKSIZ); + (void) memset(db->dirbuf, 0, DBLKSIZ); + /* + * success + */ + return db; + } + (void) close(db->dirf); + } + (void) sdbm_fd_unlock(db->pagf); + } + (void) close(db->pagf); + } + free((char *) db); + return (DBM *) NULL; +} + +void +sdbm_close(db) +register DBM *db; +{ + if (db == NULL) + errno = EINVAL; + else { + (void) close(db->dirf); + (void) sdbm_fd_unlock(db->pagf); + (void) close(db->pagf); + free((char *) db); + } +} + +datum +sdbm_fetch(db, key) +register DBM *db; +datum key; +{ + if (db == NULL || bad(key)) + return errno = EINVAL, nullitem; + + if (getpage(db, exhash(key))) + return getpair(db->pagbuf, key); + + return ioerr(db), nullitem; +} + +int +sdbm_delete(db, key) +register DBM *db; +datum key; +{ + if (db == NULL || bad(key)) + return errno = EINVAL, -1; + if (sdbm_rdonly(db)) + return errno = EPERM, -1; + + if (getpage(db, exhash(key))) { + if (!delpair(db->pagbuf, key)) + return -1; +/* + * update the page file + */ + if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0 + || write(db->pagf, db->pagbuf, PBLKSIZ) < 0) + return ioerr(db), -1; + + return 0; + } + + return ioerr(db), -1; +} + +int +sdbm_store(db, key, val, flags) +register DBM *db; +datum key; +datum val; +int flags; +{ + int need; + register long hash; + + if (db == NULL || bad(key)) + return errno = EINVAL, -1; + if (sdbm_rdonly(db)) + return errno = EPERM, -1; + + need = key.dsize + val.dsize; +/* + * is the pair too big (or too small) for this database ?? + */ + if (need < 0 || need > PAIRMAX) + return errno = EINVAL, -1; + + if (getpage(db, (hash = exhash(key)))) { +/* + * if we need to replace, delete the key/data pair + * first. If it is not there, ignore. + */ + if (flags == DBM_REPLACE) + (void) delpair(db->pagbuf, key); +#ifdef SEEDUPS + else if (duppair(db->pagbuf, key)) + return 1; +#endif +/* + * if we do not have enough room, we have to split. + */ + if (!fitpair(db->pagbuf, need)) + if (!makroom(db, hash, need)) + return ioerr(db), -1; +/* + * we have enough room or split is successful. insert the key, + * and update the page file. + */ + (void) putpair(db->pagbuf, key, val); + + if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0 + || write(db->pagf, db->pagbuf, PBLKSIZ) < 0) + return ioerr(db), -1; + /* + * success + */ + return 0; + } + + return ioerr(db), -1; +} + +/* + * makroom - make room by splitting the overfull page + * this routine will attempt to make room for SPLTMAX times before + * giving up. + */ +static int +makroom(db, hash, need) +register DBM *db; +long hash; +int need; +{ + long newp; + char twin[PBLKSIZ]; + char *pag = db->pagbuf; + char *new = twin; + register int smax = SPLTMAX; + + do { +/* + * split the current page + */ + (void) splpage(pag, new, db->hmask + 1); +/* + * address of the new page + */ + newp = (hash & db->hmask) | (db->hmask + 1); + +/* + * write delay, read avoidence/cache shuffle: + * select the page for incoming pair: if key is to go to the new page, + * write out the previous one, and copy the new one over, thus making + * it the current page. If not, simply write the new page, and we are + * still looking at the page of interest. current page is not updated + * here, as sdbm_store will do so, after it inserts the incoming pair. + */ + if (hash & (db->hmask + 1)) { + if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0 + || write(db->pagf, db->pagbuf, PBLKSIZ) < 0) + return 0; + db->pagbno = newp; + (void) memcpy(pag, new, PBLKSIZ); + } + else if (lseek(db->pagf, OFF_PAG(newp), SEEK_SET) < 0 + || write(db->pagf, new, PBLKSIZ) < 0) + return 0; + + if (!setdbit(db, db->curbit)) + return 0; +/* + * see if we have enough room now + */ + if (fitpair(pag, need)) + return 1; +/* + * try again... update curbit and hmask as getpage would have + * done. because of our update of the current page, we do not + * need to read in anything. BUT we have to write the current + * [deferred] page out, as the window of failure is too great. + */ + db->curbit = 2 * db->curbit + + ((hash & (db->hmask + 1)) ? 2 : 1); + db->hmask |= db->hmask + 1; + + if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0 + || write(db->pagf, db->pagbuf, PBLKSIZ) < 0) + return 0; + + } while (--smax); +/* + * if we are here, this is real bad news. After SPLTMAX splits, + * we still cannot fit the key. say goodnight. + */ +#ifdef BADMESS + (void) write(2, "sdbm: cannot insert after SPLTMAX attempts.\n", 44); +#endif + return 0; + +} + +/* + * the following two routines will break if + * deletions aren't taken into account. (ndbm bug) + */ +datum +sdbm_firstkey(db) +register DBM *db; +{ + if (db == NULL) + return errno = EINVAL, nullitem; +/* + * start at page 0 + */ + if (lseek(db->pagf, OFF_PAG(0), SEEK_SET) < 0 + || read(db->pagf, db->pagbuf, PBLKSIZ) < 0) + return ioerr(db), nullitem; + db->pagbno = 0; + db->blkptr = 0; + db->keyptr = 0; + + return getnext(db); +} + +datum +sdbm_nextkey(db) +register DBM *db; +{ + if (db == NULL) + return errno = EINVAL, nullitem; + return getnext(db); +} + +/* + * all important binary trie traversal + */ +static int +getpage(db, hash) +register DBM *db; +register long hash; +{ + register int hbit; + register long dbit; + register long pagb; + + dbit = 0; + hbit = 0; + while (dbit < db->maxbno && getdbit(db, dbit)) + dbit = 2 * dbit + ((hash & (1 << hbit++)) ? 2 : 1); + + debug(("dbit: %d...", dbit)); + + db->curbit = dbit; + db->hmask = masks[hbit]; + + pagb = hash & db->hmask; +/* + * see if the block we need is already in memory. + * note: this lookaside cache has about 10% hit rate. + */ + if (pagb != db->pagbno) { +/* + * note: here, we assume a "hole" is read as 0s. + * if not, must zero pagbuf first. + */ + if (lseek(db->pagf, OFF_PAG(pagb), SEEK_SET) < 0 + || read(db->pagf, db->pagbuf, PBLKSIZ) < 0) + return 0; + if (!chkpage(db->pagbuf)) + return 0; + db->pagbno = pagb; + + debug(("pag read: %d\n", pagb)); + } + return 1; +} + +static int +getdbit(db, dbit) +register DBM *db; +register long dbit; +{ + register long c; + register long dirb; + + c = dbit / BYTESIZ; + dirb = c / DBLKSIZ; + + if (dirb != db->dirbno) { + if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0 + || read(db->dirf, db->dirbuf, DBLKSIZ) < 0) + return 0; + db->dirbno = dirb; + + debug(("dir read: %d\n", dirb)); + } + + return db->dirbuf[c % DBLKSIZ] & (1 << dbit % BYTESIZ); +} + +static int +setdbit(db, dbit) +register DBM *db; +register long dbit; +{ + register long c; + register long dirb; + + c = dbit / BYTESIZ; + dirb = c / DBLKSIZ; + + if (dirb != db->dirbno) { + if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0 + || read(db->dirf, db->dirbuf, DBLKSIZ) < 0) + return 0; + db->dirbno = dirb; + + debug(("dir read: %d\n", dirb)); + } + + db->dirbuf[c % DBLKSIZ] |= (1 << dbit % BYTESIZ); + + if (dbit >= db->maxbno) + db->maxbno += DBLKSIZ * BYTESIZ; + + if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0 + || write(db->dirf, db->dirbuf, DBLKSIZ) < 0) + return 0; + + return 1; +} + +/* + * getnext - get the next key in the page, and if done with + * the page, try the next page in sequence + */ +static datum +getnext(db) +register DBM *db; +{ + datum key; + + for (;;) { + db->keyptr++; + key = getnkey(db->pagbuf, db->keyptr); + if (key.dptr != NULL) + return key; +/* + * we either run out, or there is nothing on this page.. + * try the next one... If we lost our position on the + * file, we will have to seek. + */ + db->keyptr = 0; + if (db->pagbno != db->blkptr++) + if (lseek(db->pagf, OFF_PAG(db->blkptr), SEEK_SET) < 0) + break; + db->pagbno = db->blkptr; + if (read(db->pagf, db->pagbuf, PBLKSIZ) <= 0) + break; + if (!chkpage(db->pagbuf)) + break; + } + + return ioerr(db), nullitem; +} diff --git a/usr.sbin/httpd/src/lib/sdbm/sdbm.dsp b/usr.sbin/httpd/src/lib/sdbm/sdbm.dsp new file mode 100644 index 00000000000..42909e968b5 --- /dev/null +++ b/usr.sbin/httpd/src/lib/sdbm/sdbm.dsp @@ -0,0 +1,113 @@ +# Microsoft Developer Studio Project File - Name="sdbm" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=sdbm - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "sdbm.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "sdbm.mak" CFG="sdbm - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "sdbm - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "sdbm - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe + +!IF "$(CFG)" == "sdbm - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 +# ADD RSC /l 0x409 +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\include" /I "..\..\os\win32" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "sdbm - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +RSC=rc.exe +# ADD BASE RSC /l 0x409 +# ADD RSC /l 0x409 +# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\include" /I "..\..\os\win32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "SHARED_MODULE" /FD /c +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "sdbm - Win32 Release" +# Name "sdbm - Win32 Debug" +# Begin Source File + +SOURCE=.\sdbm.c +# End Source File +# Begin Source File + +SOURCE=.\sdbm.h +# End Source File +# Begin Source File + +SOURCE=.\sdbm_hash.c +# End Source File +# Begin Source File + +SOURCE=.\sdbm_lock.c +# End Source File +# Begin Source File + +SOURCE=.\sdbm_pair.c +# End Source File +# Begin Source File + +SOURCE=.\sdbm_pair.h +# End Source File +# Begin Source File + +SOURCE=.\sdbm_tune.h +# End Source File +# End Target +# End Project diff --git a/usr.sbin/httpd/src/lib/sdbm/sdbm.h b/usr.sbin/httpd/src/lib/sdbm/sdbm.h new file mode 100644 index 00000000000..8f729dbb76d --- /dev/null +++ b/usr.sbin/httpd/src/lib/sdbm/sdbm.h @@ -0,0 +1,86 @@ +/* + * sdbm - ndbm work-alike hashed database library + * based on Per-Ake Larson's Dynamic Hashing algorithms. BIT 18 (1978). + * author: oz@nexus.yorku.ca + * status: public domain. + */ +/* increase the block/page size and what can be inserted */ +#if 1 +#define DBLKSIZ 16384 +#define PBLKSIZ 8192 +#define PAIRMAX 8008 /* arbitrary on PBLKSIZ-N */ +#else +#define DBLKSIZ 4096 +#define PBLKSIZ 1024 +#define PAIRMAX 1008 /* arbitrary on PBLKSIZ-N */ +#endif +#define SPLTMAX 10 /* maximum allowed splits */ + /* for a single insertion */ +#define DIRFEXT ".dir" +#define PAGFEXT ".pag" + +typedef struct { + int dirf; /* directory file descriptor */ + int pagf; /* page file descriptor */ + int flags; /* status/error flags, see below */ + long maxbno; /* size of dirfile in bits */ + long curbit; /* current bit number */ + long hmask; /* current hash mask */ + long blkptr; /* current block for nextkey */ + int keyptr; /* current key for nextkey */ + long blkno; /* current page to read/write */ + long pagbno; /* current page in pagbuf */ + char pagbuf[PBLKSIZ]; /* page file block buffer */ + long dirbno; /* current block in dirbuf */ + char dirbuf[DBLKSIZ]; /* directory file block buffer */ +} DBM; + +#define DBM_RDONLY 0x1 /* data base open read-only */ +#define DBM_IOERR 0x2 /* data base I/O error */ + +/* + * utility macros + */ +#define sdbm_rdonly(db) ((db)->flags & DBM_RDONLY) +#define sdbm_error(db) ((db)->flags & DBM_IOERR) + +#define sdbm_clearerr(db) ((db)->flags &= ~DBM_IOERR) /* ouch */ + +#define sdbm_dirfno(db) ((db)->dirf) +#define sdbm_pagfno(db) ((db)->pagf) + +typedef struct { + char *dptr; + int dsize; +} datum; + +extern datum nullitem; + +#ifdef __STDC__ +#define proto(p) p +#else +#define proto(p) () +#endif + +/* + * flags to sdbm_store + */ +#define DBM_INSERT 0 +#define DBM_REPLACE 1 + +/* + * ndbm interface + */ +extern DBM *sdbm_open proto((char *, int, int)); +extern void sdbm_close proto((DBM *)); +extern datum sdbm_fetch proto((DBM *, datum)); +extern int sdbm_delete proto((DBM *, datum)); +extern int sdbm_store proto((DBM *, datum, datum, int)); +extern datum sdbm_firstkey proto((DBM *)); +extern datum sdbm_nextkey proto((DBM *)); + +/* + * other + */ +extern DBM *sdbm_prep proto((char *, char *, int, int)); +extern long sdbm_hash proto((char *, int)); diff --git a/usr.sbin/httpd/src/lib/sdbm/sdbm.mak b/usr.sbin/httpd/src/lib/sdbm/sdbm.mak new file mode 100644 index 00000000000..c9ac309cc2e --- /dev/null +++ b/usr.sbin/httpd/src/lib/sdbm/sdbm.mak @@ -0,0 +1,245 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on sdbm.dsp +!IF "$(CFG)" == "" +CFG=sdbm - Win32 Debug +!MESSAGE No configuration specified. Defaulting to sdbm - Win32 Debug. +!ENDIF + +!IF "$(CFG)" != "sdbm - Win32 Release" && "$(CFG)" != "sdbm - Win32 Debug" +!MESSAGE Invalid configuration "$(CFG)" specified. +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "sdbm.mak" CFG="sdbm - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "sdbm - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "sdbm - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(CFG)" == "sdbm - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\sdbm.lib" + +!ELSE + +ALL : "$(OUTDIR)\sdbm.lib" + +!ENDIF + +CLEAN : + -@erase "$(INTDIR)\sdbm.obj" + -@erase "$(INTDIR)\sdbm_hash.obj" + -@erase "$(INTDIR)\sdbm_lock.obj" + -@erase "$(INTDIR)\sdbm_pair.obj" + -@erase "$(INTDIR)\vc50.idb" + -@erase "$(OUTDIR)\sdbm.lib" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +RSC=rc.exe +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "..\..\include" /I "..\..\os\win32" /D\ + "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c +CPP_OBJS=.\Release/ +CPP_SBRS=. + +.c{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\sdbm.bsc" +BSC32_SBRS= \ + +LIB32=link.exe -lib +LIB32_FLAGS=/nologo /out:"$(OUTDIR)\sdbm.lib" +LIB32_OBJS= \ + "$(INTDIR)\sdbm.obj" \ + "$(INTDIR)\sdbm_hash.obj" \ + "$(INTDIR)\sdbm_lock.obj" \ + "$(INTDIR)\sdbm_pair.obj" + +"$(OUTDIR)\sdbm.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS) + $(LIB32) @<< + $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) +<< + +!ELSEIF "$(CFG)" == "sdbm - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\sdbm.lib" + +!ELSE + +ALL : "$(OUTDIR)\sdbm.lib" + +!ENDIF + +CLEAN : + -@erase "$(INTDIR)\sdbm.obj" + -@erase "$(INTDIR)\sdbm_hash.obj" + -@erase "$(INTDIR)\sdbm_lock.obj" + -@erase "$(INTDIR)\sdbm_pair.obj" + -@erase "$(INTDIR)\vc50.idb" + -@erase "$(INTDIR)\vc50.pdb" + -@erase "$(OUTDIR)\sdbm.lib" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +RSC=rc.exe +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\include" /I\ + "..\..\os\win32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "SHARED_MODULE"\ + /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c +CPP_OBJS=.\Debug/ +CPP_SBRS=. + +.c{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\sdbm.bsc" +BSC32_SBRS= \ + +LIB32=link.exe -lib +LIB32_FLAGS=/nologo /out:"$(OUTDIR)\sdbm.lib" +LIB32_OBJS= \ + "$(INTDIR)\sdbm.obj" \ + "$(INTDIR)\sdbm_hash.obj" \ + "$(INTDIR)\sdbm_lock.obj" \ + "$(INTDIR)\sdbm_pair.obj" + +"$(OUTDIR)\sdbm.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS) + $(LIB32) @<< + $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) +<< + +!ENDIF + + +!IF "$(CFG)" == "sdbm - Win32 Release" || "$(CFG)" == "sdbm - Win32 Debug" +SOURCE=.\sdbm.c +DEP_CPP_SDBM_=\ + ".\sdbm.h"\ + ".\sdbm_pair.h"\ + ".\sdbm_tune.h"\ + + +"$(INTDIR)\sdbm.obj" : $(SOURCE) $(DEP_CPP_SDBM_) "$(INTDIR)" + + +SOURCE=.\sdbm_hash.c +DEP_CPP_SDBM_H=\ + ".\sdbm.h"\ + + +"$(INTDIR)\sdbm_hash.obj" : $(SOURCE) $(DEP_CPP_SDBM_H) "$(INTDIR)" + + +SOURCE=.\sdbm_lock.c +DEP_CPP_SDBM_L=\ + "..\..\include\ap_config.h"\ + "..\..\include\ap_ctype.h"\ + "..\..\include\ap_mmn.h"\ + "..\..\include\hsregex.h"\ + "..\..\os\win32\os.h"\ + +NODEP_CPP_SDBM_L=\ + "..\..\include\ap_config_auto.h"\ + + +"$(INTDIR)\sdbm_lock.obj" : $(SOURCE) $(DEP_CPP_SDBM_L) "$(INTDIR)" + + +SOURCE=.\sdbm_pair.c +DEP_CPP_SDBM_P=\ + ".\sdbm.h"\ + ".\sdbm_pair.h"\ + ".\sdbm_tune.h"\ + + +"$(INTDIR)\sdbm_pair.obj" : $(SOURCE) $(DEP_CPP_SDBM_P) "$(INTDIR)" + + + +!ENDIF + diff --git a/usr.sbin/httpd/src/lib/sdbm/sdbm_hash.c b/usr.sbin/httpd/src/lib/sdbm/sdbm_hash.c new file mode 100644 index 00000000000..4b04add367b --- /dev/null +++ b/usr.sbin/httpd/src/lib/sdbm/sdbm_hash.c @@ -0,0 +1,48 @@ +/* + * sdbm - ndbm work-alike hashed database library + * based on Per-Aake Larson's Dynamic Hashing algorithms. BIT 18 (1978). + * author: oz@nexus.yorku.ca + * status: public domain. keep it that way. + * + * hashing routine + */ + +#include "sdbm.h" +/* + * polynomial conversion ignoring overflows + * [this seems to work remarkably well, in fact better + * then the ndbm hash function. Replace at your own risk] + * use: 65599 nice. + * 65587 even better. + */ +long +sdbm_hash(str, len) +register char *str; +register int len; +{ + register unsigned long n = 0; + +#define DUFF /* go ahead and use the loop-unrolled version */ +#ifdef DUFF + +#define HASHC n = *str++ + 65599 * n + + if (len > 0) { + register int loop = (len + 8 - 1) >> 3; + + switch(len & (8 - 1)) { + case 0: do { + HASHC; case 7: HASHC; + case 6: HASHC; case 5: HASHC; + case 4: HASHC; case 3: HASHC; + case 2: HASHC; case 1: HASHC; + } while (--loop); + } + + } +#else + while (len--) + n = *str++ + 65599 * n; +#endif + return n; +} diff --git a/usr.sbin/httpd/src/lib/sdbm/sdbm_lock.c b/usr.sbin/httpd/src/lib/sdbm/sdbm_lock.c new file mode 100644 index 00000000000..a8c2fa437ab --- /dev/null +++ b/usr.sbin/httpd/src/lib/sdbm/sdbm_lock.c @@ -0,0 +1,106 @@ +/* +** File locking +** +** Snarfed from mod_rewrite.c. Munged up for our use. +*/ + +#include "ap_config.h" + + /* The locking support: + * Try to determine whether we should use fcntl() or flock(). + * Would be better ap_config.h could provide this... :-( + */ +#if defined(USE_FCNTL_SERIALIZED_ACCEPT) +#define USE_FCNTL 1 +#include <fcntl.h> +#endif +#if defined(USE_FLOCK_SERIALIZED_ACCEPT) +#define USE_FLOCK 1 +#include <sys/file.h> +#endif +#if !defined(USE_FCNTL) && !defined(USE_FLOCK) +#define USE_FLOCK 1 +#if !defined(MPE) && !defined(WIN32) +#include <sys/file.h> +#endif +#ifndef LOCK_UN +#undef USE_FLOCK +#define USE_FCNTL 1 +#include <fcntl.h> +#endif +#endif +#ifdef AIX +#undef USE_FLOCK +#define USE_FCNTL 1 +#include <fcntl.h> +#endif +#ifdef WIN32 +#undef USE_FCNTL +#define USE_LOCKING +#include <sys/locking.h> +#endif + + +#ifdef USE_FCNTL +/* ugly interface requires this structure to be "live" for a while */ +static struct flock lock_it; +static struct flock unlock_it; +#endif + +/* NOTE: this function blocks until it acquires the lock */ +int sdbm_fd_lock(int fd, int readonly) +{ + int rc; + +#ifdef USE_FCNTL + lock_it.l_whence = SEEK_SET; /* from current point */ + lock_it.l_start = 0; /* -"- */ + lock_it.l_len = 0; /* until end of file */ + lock_it.l_type = readonly ? F_RDLCK : F_WRLCK; /* set lock type */ + lock_it.l_pid = 0; /* pid not actually interesting */ + + while ( ((rc = fcntl(fd, F_SETLKW, &lock_it)) < 0) + && (errno == EINTR) ) { + continue; + } +#endif +#ifdef USE_FLOCK + while ( ((rc = flock(fd, readonly ? LOCK_SH : LOCK_EX)) < 0) + && (errno == EINTR) ) { + continue; + } +#endif +#ifdef USE_LOCKING + /* ### this doesn't allow simultaneous reads! */ + /* ### this doesn't block forever */ + /* Lock the first byte */ + lseek(fd, 0, SEEK_SET); + rc = _locking(fd, _LK_LOCK, 1); +#endif + + return rc; +} + +int sdbm_fd_unlock(int fd) +{ + int rc; + +#ifdef USE_FCNTL + unlock_it.l_whence = SEEK_SET; /* from current point */ + unlock_it.l_start = 0; /* -"- */ + unlock_it.l_len = 0; /* until end of file */ + unlock_it.l_type = F_UNLCK; /* unlock */ + unlock_it.l_pid = 0; /* pid not actually interesting */ + + rc = fcntl(fd, F_SETLKW, &unlock_it); +#endif +#ifdef USE_FLOCK + rc = flock(fd, LOCK_UN); +#endif +#ifdef USE_LOCKING + lseek(fd, 0, SEEK_SET); + rc = _locking(fd, _LK_UNLCK, 1); +#endif + + return rc; +} diff --git a/usr.sbin/httpd/src/lib/sdbm/sdbm_pair.c b/usr.sbin/httpd/src/lib/sdbm/sdbm_pair.c new file mode 100644 index 00000000000..f581bc96360 --- /dev/null +++ b/usr.sbin/httpd/src/lib/sdbm/sdbm_pair.c @@ -0,0 +1,303 @@ +/* + * sdbm - ndbm work-alike hashed database library + * based on Per-Aake Larson's Dynamic Hashing algorithms. BIT 18 (1978). + * author: oz@nexus.yorku.ca + * status: public domain. + * + * page-level routines + */ + +#include "sdbm.h" +#include "sdbm_tune.h" +#include "sdbm_pair.h" + +#include <string.h> /* for memset() */ + + +#define exhash(item) sdbm_hash((item).dptr, (item).dsize) + +/* + * forward + */ +static int seepair proto((char *, int, char *, int)); + +/* + * page format: + * +------------------------------+ + * ino | n | keyoff | datoff | keyoff | + * +------------+--------+--------+ + * | datoff | - - - ----> | + * +--------+---------------------+ + * | F R E E A R E A | + * +--------------+---------------+ + * | <---- - - - | data | + * +--------+-----+----+----------+ + * | key | data | key | + * +--------+----------+----------+ + * + * calculating the offsets for free area: if the number + * of entries (ino[0]) is zero, the offset to the END of + * the free area is the block size. Otherwise, it is the + * nth (ino[ino[0]]) entry's offset. + */ + +int +fitpair(pag, need) +char *pag; +int need; +{ + register int n; + register int off; + register int avail; + register short *ino = (short *) pag; + + off = ((n = ino[0]) > 0) ? ino[n] : PBLKSIZ; + avail = off - (n + 1) * sizeof(short); + need += 2 * sizeof(short); + + debug(("avail %d need %d\n", avail, need)); + + return need <= avail; +} + +void +putpair(pag, key, val) +char *pag; +datum key; +datum val; +{ + register int n; + register int off; + register short *ino = (short *) pag; + + off = ((n = ino[0]) > 0) ? ino[n] : PBLKSIZ; +/* + * enter the key first + */ + off -= key.dsize; + (void) memcpy(pag + off, key.dptr, key.dsize); + ino[n + 1] = off; +/* + * now the data + */ + off -= val.dsize; + (void) memcpy(pag + off, val.dptr, val.dsize); + ino[n + 2] = off; +/* + * adjust item count + */ + ino[0] += 2; +} + +datum +getpair(pag, key) +char *pag; +datum key; +{ + register int i; + register int n; + datum val; + register short *ino = (short *) pag; + + if ((n = ino[0]) == 0) + return nullitem; + + if ((i = seepair(pag, n, key.dptr, key.dsize)) == 0) + return nullitem; + + val.dptr = pag + ino[i + 1]; + val.dsize = ino[i] - ino[i + 1]; + return val; +} + +#ifdef SEEDUPS +int +duppair(pag, key) +char *pag; +datum key; +{ + register short *ino = (short *) pag; + return ino[0] > 0 && seepair(pag, ino[0], key.dptr, key.dsize) > 0; +} +#endif + +datum +getnkey(pag, num) +char *pag; +int num; +{ + datum key; + register int off; + register short *ino = (short *) pag; + + num = num * 2 - 1; + if (ino[0] == 0 || num > ino[0]) + return nullitem; + + off = (num > 1) ? ino[num - 1] : PBLKSIZ; + + key.dptr = pag + ino[num]; + key.dsize = off - ino[num]; + + return key; +} + +int +delpair(pag, key) +char *pag; +datum key; +{ + register int n; + register int i; + register short *ino = (short *) pag; + + if ((n = ino[0]) == 0) + return 0; + + if ((i = seepair(pag, n, key.dptr, key.dsize)) == 0) + return 0; +/* + * found the key. if it is the last entry + * [i.e. i == n - 1] we just adjust the entry count. + * hard case: move all data down onto the deleted pair, + * shift offsets onto deleted offsets, and adjust them. + * [note: 0 < i < n] + */ + if (i < n - 1) { + register int m; + register char *dst = pag + (i == 1 ? PBLKSIZ : ino[i - 1]); + register char *src = pag + ino[i + 1]; + register int zoo = dst - src; + + debug(("free-up %d ", zoo)); +/* + * shift data/keys down + */ + m = ino[i + 1] - ino[n]; + +#undef DUFF /* just use memmove. it should be plenty fast. */ +#ifdef DUFF +#define MOVB *--dst = *--src + + if (m > 0) { + register int loop = (m + 8 - 1) >> 3; + + switch (m & (8 - 1)) { + case 0: do { + MOVB; case 7: MOVB; + case 6: MOVB; case 5: MOVB; + case 4: MOVB; case 3: MOVB; + case 2: MOVB; case 1: MOVB; + } while (--loop); + } + } +#else + dst -= m; + src -= m; + memmove(dst, src, m); +#endif + +/* + * adjust offset index up + */ + while (i < n - 1) { + ino[i] = ino[i + 2] + zoo; + i++; + } + } + ino[0] -= 2; + return 1; +} + +/* + * search for the key in the page. + * return offset index in the range 0 < i < n. + * return 0 if not found. + */ +static int +seepair(pag, n, key, siz) +char *pag; +register int n; +register char *key; +register int siz; +{ + register int i; + register int off = PBLKSIZ; + register short *ino = (short *) pag; + + for (i = 1; i < n; i += 2) { + if (siz == off - ino[i] && + memcmp(key, pag + ino[i], siz) == 0) + return i; + off = ino[i + 1]; + } + return 0; +} + +void +splpage(pag, new, sbit) +char *pag; +char *new; +long sbit; +{ + datum key; + datum val; + + register int n; + register int off = PBLKSIZ; + char cur[PBLKSIZ]; + register short *ino = (short *) cur; + + (void) memcpy(cur, pag, PBLKSIZ); + (void) memset(pag, 0, PBLKSIZ); + (void) memset(new, 0, PBLKSIZ); + + n = ino[0]; + for (ino++; n > 0; ino += 2) { + key.dptr = cur + ino[0]; + key.dsize = off - ino[0]; + val.dptr = cur + ino[1]; + val.dsize = ino[0] - ino[1]; +/* + * select the page pointer (by looking at sbit) and insert + */ + (void) putpair((exhash(key) & sbit) ? new : pag, key, val); + + off = ino[1]; + n -= 2; + } + + debug(("%d split %d/%d\n", ((short *) cur)[0] / 2, + ((short *) new)[0] / 2, + ((short *) pag)[0] / 2)); +} + +/* + * check page sanity: + * number of entries should be something + * reasonable, and all offsets in the index should be in order. + * this could be made more rigorous. + */ +int +chkpage(pag) +char *pag; +{ + register int n; + register int off; + register short *ino = (short *) pag; + + if ((n = ino[0]) < 0 || n > PBLKSIZ / sizeof(short)) + return 0; + + if (n > 0) { + off = PBLKSIZ; + for (ino++; n > 0; ino += 2) { + if (ino[0] > off || ino[1] > off || + ino[1] > ino[0]) + return 0; + off = ino[1]; + n -= 2; + } + } + return 1; +} diff --git a/usr.sbin/httpd/src/lib/sdbm/sdbm_pair.h b/usr.sbin/httpd/src/lib/sdbm/sdbm_pair.h new file mode 100644 index 00000000000..8a675b90659 --- /dev/null +++ b/usr.sbin/httpd/src/lib/sdbm/sdbm_pair.h @@ -0,0 +1,20 @@ +/* Mini EMBED (pair.c) */ +#define chkpage sdbm__chkpage +#define delpair sdbm__delpair +#define duppair sdbm__duppair +#define fitpair sdbm__fitpair +#define getnkey sdbm__getnkey +#define getpair sdbm__getpair +#define putpair sdbm__putpair +#define splpage sdbm__splpage + +extern int fitpair proto((char *, int)); +extern void putpair proto((char *, datum, datum)); +extern datum getpair proto((char *, datum)); +extern int delpair proto((char *, datum)); +extern int chkpage proto((char *)); +extern datum getnkey proto((char *, int)); +extern void splpage proto((char *, char *, long)); +#ifdef SEEDUPS +extern int duppair proto((char *, datum)); +#endif diff --git a/usr.sbin/httpd/src/lib/sdbm/sdbm_tune.h b/usr.sbin/httpd/src/lib/sdbm/sdbm_tune.h new file mode 100644 index 00000000000..7ed7dda9b4d --- /dev/null +++ b/usr.sbin/httpd/src/lib/sdbm/sdbm_tune.h @@ -0,0 +1,26 @@ +/* + * sdbm - ndbm work-alike hashed database library + * tuning and portability constructs [not nearly enough] + * author: oz@nexus.yorku.ca + */ + +#define BYTESIZ 8 + +/* + * important tuning parms (hah) + */ + +#define SEEDUPS /* always detect duplicates */ +#define BADMESS /* generate a message for worst case: + cannot make room after SPLTMAX splits */ +/* + * misc + */ +#ifdef DEBUG +#define debug(x) printf x +#else +#define debug(x) +#endif + +int sdbm_fd_lock(int fd, int readonly); +int sdbm_fd_unlock(int fd); diff --git a/usr.sbin/httpd/src/makefile.win b/usr.sbin/httpd/src/makefile.win new file mode 100644 index 00000000000..4120cd98973 --- /dev/null +++ b/usr.sbin/httpd/src/makefile.win @@ -0,0 +1,144 @@ +# Makefile for Windows NT and Windows 95/98/2000 + +# Targets are: +# _apacher - build Apache in Release mode +# _apached - build Apache in Debug mode +# installr - build and install a Release build +# installd - build and install a Debug build +# clean - remove (most) generated files +# _cleanr - remove (most) files generated by a Release build +# _cleand - remove (most) files generated by a Debug build +# +# The default installation directory is \Apache. This can be changed +# with the INSTDIR macro, for example: +# +# nmake /f Makefile.nt INSTDIR="d:\Program Files\Apache" installr +# +# Note: this does *NOT* change the compiled in default "server root" + +!IF "$(INSTDIR)" == "" +INSTDIR=\Apache +!MESSAGE Using default install directory \Apache +!ENDIF + +!IF "$(MAKE)" == "NMAKE" +# Microsoft NMake options +MAKEOPT=-nologo +!ELSEIF "$(MAKE)" == "make" +# Borland make options +# Borland build of Apache is highly experimental and unsupported. +MAKEOPT=-s -N +!ELSE +!MESSAGE Warning: unrecognized build command "$(MAKE)" +!ENDIF + +default: _apacher + +_apacher: + $(MAKE) $(MAKEOPT) -f Makefile.win SHORT=R LONG=Release _build + +_apached: + $(MAKE) $(MAKEOPT) -f Makefile.win SHORT=D LONG=Debug _build + +installr: + $(MAKE) $(MAKEOPT) -f Makefile.win SHORT=R LONG=Release _build _install + +installd: + $(MAKE) $(MAKEOPT) -f Makefile.win SHORT=D LONG=Debug _build _install + +_cleanr: + $(MAKE) $(MAKEOPT) -f Makefile.win SHORT=R LONG=Release CTARGET=CLEAN _build + +_cleand: + $(MAKE) $(MAKEOPT) -f Makefile.win SHORT=D LONG=Debug CTARGET=CLEAN _build + +clean: _cleanr _cleand + $(MAKE) $(MAKEOPT) -f Makefile.win SHORT=R LONG=Release CTARGET=CLEAN _installdll + +installdll: + $(MAKE) $(MAKEOPT) -f Makefile.win SHORT=R LONG=Release _installdll + + +_build: +# echo LONG $(LONG) SHORT $(SHORT) x + cd os\win32 + $(MAKE) $(MAKEOPT) -f ApacheOS.mak CFG="ApacheOS - Win32 $(LONG)" RECURSE=0 $(CTARGET) + cd ..\.. + cd regex + $(MAKE) $(MAKEOPT) -f regex.mak CFG="regex - Win32 $(LONG)" RECURSE=0 $(CTARGET) + cd .. + cd ap + $(MAKE) $(MAKEOPT) -f ap.mak CFG="ap - Win32 $(LONG)" RECURSE=0 $(CTARGET) + cd .. + cd support + $(MAKE) $(MAKEOPT) -f htpasswd.mak CFG="htpasswd - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f htdigest.mak CFG="htdigest - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f logresolve.mak CFG="logresolve - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f rotatelogs.mak CFG="rotatelogs - Win32 $(LONG)" RECURSE=0 $(CTARGET) + cd .. + cd lib/expat-lite + $(MAKE) $(MAKEOPT) -f xmltok.mak CFG="xmltok - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f xmlparse.mak CFG="xmlparse - Win32 $(LONG)" RECURSE=0 $(CTARGET) + cd ../.. + cd lib/sdbm + $(MAKE) $(MAKEOPT) -f sdbm.mak CFG="sdbm - Win32 $(LONG)" RECURSE=0 $(CTARGET) + cd ../.. + cd main + $(MAKE) $(MAKEOPT) -f gen_uri_delims.mak CFG="gen_uri_delims - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f gen_test_char.mak CFG="gen_test_char - Win32 $(LONG)" RECURSE=0 $(CTARGET) + cd .. + -del Core$(SHORT)\buildmark.obj + $(MAKE) $(MAKEOPT) -f ApacheCore.mak CFG="ApacheCore - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f Apache.mak CFG="Apache - Win32 $(LONG)" RECURSE=0 $(CTARGET) + cd os\win32 + set CFG=ApacheModuleStatus - Win32 $(LONG) + $(MAKE) $(MAKEOPT) -f ApacheModuleStatus.mak CFG="ApacheModuleStatus - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f ApacheModuleInfo.mak CFG="ApacheModuleInfo - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f ApacheModuleAuthAnon.mak CFG="ApacheModuleAuthAnon - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f ApacheModuleDigest.mak CFG="ApacheModuleDigest - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f ApacheModuleCERNMeta.mak CFG="ApacheModuleCERNMeta - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f ApacheModuleExpires.mak CFG="ApacheModuleExpires - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f ApacheModuleHeaders.mak CFG="ApacheModuleHeaders - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f ApacheModuleSpeling.mak CFG="ApacheModuleSpeling - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f ApacheModuleUserTrack.mak CFG="ApacheModuleUserTrack - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f ApacheModuleRewrite.mak CFG="ApacheModuleRewrite - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f ApacheModuleAuthDigest.mak CFG="ApacheModuleAuthDigest - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f ApacheModuleAuthDBM.mak CFG="ApacheModuleAuthDBM - Win32 $(LONG)" RECURSE=0 $(CTARGET) + cd ..\.. + cd modules\proxy + $(MAKE) $(MAKEOPT) -f ApacheModuleProxy.mak CFG="ApacheModuleProxy - Win32 $(LONG)" RECURSE=0 $(CTARGET) + cd ..\.. + +_install: + -mkdir $(INSTDIR) + -mkdir $(INSTDIR)\modules + -mkdir $(INSTDIR)\logs + -mkdir $(INSTDIR)\conf + -mkdir $(INSTDIR)\bin + copy Apache$(SHORT)\Apache.exe $(INSTDIR) + copy Core$(SHORT)\ApacheCore.dll $(INSTDIR) + copy lib\expat-lite\$(LONG)\xmltok.dll $(INSTDIR) + copy lib\expat-lite\$(LONG)\xmlparse.dll $(INSTDIR) + copy os\win32\ApacheModuleStatus$(SHORT)\ApacheModuleStatus.dll $(INSTDIR)\modules + copy os\win32\ApacheModuleInfo$(SHORT)\ApacheModuleInfo.dll $(INSTDIR)\modules + copy os\win32\ApacheModuleAuthAnon$(SHORT)\ApacheModuleAuthAnon.dll $(INSTDIR)\modules + copy os\win32\ApacheModuleDigest$(SHORT)\ApacheModuleDigest.dll $(INSTDIR)\modules + copy os\win32\ApacheModuleCERNMeta$(SHORT)\ApacheModuleCERNMeta.dll $(INSTDIR)\modules + copy os\win32\ApacheModuleExpires$(SHORT)\ApacheModuleExpires.dll $(INSTDIR)\modules + copy os\win32\ApacheModuleHeaders$(SHORT)\ApacheModuleHeaders.dll $(INSTDIR)\modules + copy os\win32\ApacheModuleRewrite$(SHORT)\ApacheModuleRewrite.dll $(INSTDIR)\modules + copy os\win32\ApacheModuleSpeling$(SHORT)\ApacheModuleSpeling.dll $(INSTDIR)\modules + copy os\win32\ApacheModuleUserTrack$(SHORT)\ApacheModuleUserTrack.dll $(INSTDIR)\modules + copy os\win32\ApacheModuleAuthDigest$(SHORT)\ApacheModuleAuthDigest.dll $(INSTDIR)\modules + copy os\win32\ApacheModuleAuthDBM$(SHORT)\ApacheModuleAuthDBM.dll $(INSTDIR)\modules + copy modules\proxy\$(LONG)\ApacheModuleProxy.dll $(INSTDIR)\modules + copy support\$(LONG)\htpasswd.exe $(INSTDIR)\bin + copy support\$(LONG)\htdigest.exe $(INSTDIR)\bin + copy support\$(LONG)\logresolve.exe $(INSTDIR)\bin + copy support\$(LONG)\rotatelogs.exe $(INSTDIR)\bin + copy support\dbmmanage $(INSTDIR)\bin\dbmmanage.pl + +_installdll: + cd os\win32\installer\installdll + $(MAKE) $(MAKEOPT) -f install.mak CFG="install - Win32 $(LONG)" RECURSE=0 $(CTARGET) + cd ..\..\.. diff --git a/usr.sbin/httpd/src/os/netware/ApacheModuleTLS.def b/usr.sbin/httpd/src/os/netware/ApacheModuleTLS.def new file mode 100644 index 00000000000..cd923a556e7 --- /dev/null +++ b/usr.sbin/httpd/src/os/netware/ApacheModuleTLS.def @@ -0,0 +1,3 @@ +MODULE wspssl +EXPORT tls_module + diff --git a/usr.sbin/httpd/src/os/netware/libpre.c b/usr.sbin/httpd/src/os/netware/libpre.c new file mode 100644 index 00000000000..1e48e520db2 --- /dev/null +++ b/usr.sbin/httpd/src/os/netware/libpre.c @@ -0,0 +1,20 @@ +/*------------------------------------------------------------------ + These functions are to be called when the shared NLM starts and + stops. By using these functions instead of defining a main() + and calling ExitThread(TSR_THREAD, 0), the load time of the + shared NLM is faster and memory size reduced. + + You may also want to override these in your own Apache module + to do any cleanup other than the mechanism Apache modules + provide. +------------------------------------------------------------------*/ + +int _lib_start() +{ + return 0; +} + +int _lib_stop() +{ + return 0; +} diff --git a/usr.sbin/httpd/src/os/netware/libprews.c b/usr.sbin/httpd/src/os/netware/libprews.c new file mode 100644 index 00000000000..100e2f30818 --- /dev/null +++ b/usr.sbin/httpd/src/os/netware/libprews.c @@ -0,0 +1,25 @@ +/*------------------------------------------------------------------ + These functions are to be called when the shared NLM starts and + stops. By using these functions instead of defining a main() + and calling ExitThread(TSR_THREAD, 0), the load time of the + shared NLM is faster and memory size reduced. + + You may also want to override these in your own Apache module + to do any cleanup other than the mechanism Apache modules + provide. +------------------------------------------------------------------*/ +#include "stddef.h" +#include "ws2nlm.h" + +int _lib_start_ws() +{ + WSADATA wsaData; + + return WSAStartup((WORD) MAKEWORD(2, 0), &wsaData); +} + +int _lib_stop_ws() +{ + WSACleanup(); + return 0; +} diff --git a/usr.sbin/httpd/src/os/netware/mod_tls.c b/usr.sbin/httpd/src/os/netware/mod_tls.c new file mode 100644 index 00000000000..b85c369d92b --- /dev/null +++ b/usr.sbin/httpd/src/os/netware/mod_tls.c @@ -0,0 +1,387 @@ +/* ==================================================================== + * Copyright (c) 1995-1999 The Apache Group. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the Apache Group + * for use in the Apache HTTP server project (http://www.apache.org/)." + * + * 4. The names "Apache Server" and "Apache Group" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache" + * nor may "Apache" appear in their names without prior written + * permission of the Apache Group. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the Apache Group + * for use in the Apache HTTP server project (http://www.apache.org/)." + * + * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Group and was originally based + * on public domain software written at the National Center for + * Supercomputing Applications, University of Illinois, Urbana-Champaign. + * For more information on the Apache Group and the Apache HTTP server + * project, please see <http://www.apache.org/>. + * + */ + +/* + * mod_tls.c - Apache SSL/TLS module for NetWare by Mike Gardiner. + * + * This module gives Apache the ability to do SSL/TLS with a minimum amount + * of effort. All of the SSL/TLS logic is already on NetWare versions 5 and + * above and is interfaced through WinSock on NetWare. As you can see in + * the code below SSL/TLS sockets can be created with three WinSock calls. + * + * To load, simply place the module in the modules directory under the main + * apache tree. Then add a "SecureListen" with two arguments. The first + * argument is an address and/or port. The second argument is the key pair + * name as created in ConsoleOne. + * + * Examples: + * + * SecureListen 443 "SSL CertificateIP" + * SecureListen 123.45.67.89:443 mycert + */ + +#define CORE_PRIVATE +#define WS_SSL + +#define MAX_ADDRESS 512 +#define MAX_KEY 80 + +#include "httpd.h" +#include "http_config.h" +#include "http_conf_globals.h" +#include "http_log.h" +#include "http_main.h" + +module MODULE_VAR_EXPORT tls_module; + +typedef struct TLSSrvConfigRec TLSSrvConfigRec; +typedef struct seclisten_rec seclisten_rec; +static fd_set listenfds; + +struct seclisten_rec { + seclisten_rec *next; + struct sockaddr_in local_addr; /* local IP address and port */ + int fd; + int used; /* Only used during restart */ + char key[MAX_KEY]; +}; + +struct TLSSrvConfigRec { + table *sltable; +}; + +static seclisten_rec* ap_seclisteners = NULL; + +#define get_tls_cfg(srv) (TLSSrvConfigRec *) ap_get_module_config(srv->module_config, &tls_module) + + +static int find_secure_listener(seclisten_rec *lr) +{ + seclisten_rec *sl; + + for (sl = ap_seclisteners; sl; sl = sl->next) { + if (!memcmp(&sl->local_addr, &lr->local_addr, sizeof(sl->local_addr))) { + sl->used = 1; + return sl->fd; + } + } + return -1; +} + + +static int make_secure_socket(pool *p, const struct sockaddr_in *server, + char* key, server_rec *server_conf) +{ + int s; + int one = 1; + char addr[MAX_ADDRESS]; + struct sslserveropts opts; + struct linger li; + unsigned short optParam; + WSAPROTOCOL_INFO SecureProtoInfo; + int no = 1; + + if (server->sin_addr.s_addr != htonl(INADDR_ANY)) + ap_snprintf(addr, sizeof(addr), "address %s port %d", + inet_ntoa(server->sin_addr), ntohs(server->sin_port)); + else + ap_snprintf(addr, sizeof(addr), "port %d", ntohs(server->sin_port)); + + /* note that because we're about to slack we don't use psocket */ + ap_block_alarms(); + memset(&SecureProtoInfo, 0, sizeof(WSAPROTOCOL_INFO)); + + SecureProtoInfo.iAddressFamily = AF_INET; + SecureProtoInfo.iSocketType = SOCK_STREAM; + SecureProtoInfo.iProtocol = IPPROTO_TCP; + SecureProtoInfo.iSecurityScheme = SECURITY_PROTOCOL_SSL; + + s = WSASocket(AF_INET, SOCK_STREAM, IPPROTO_TCP, + (LPWSAPROTOCOL_INFO)&SecureProtoInfo, 0, 0); + + if (s == INVALID_SOCKET) { + errno = WSAGetLastError(); + ap_log_error(APLOG_MARK, APLOG_CRIT, server_conf, + "make_secure_socket: failed to get a socket for %s", addr); + ap_unblock_alarms(); + return -1; + } + + optParam = SO_SSL_ENABLE | SO_SSL_SERVER; + + if (WSAIoctl(s, SO_SSL_SET_FLAGS, (char *)&optParam, + sizeof(unsigned short), NULL, 0, NULL, NULL, NULL)) { + errno = WSAGetLastError(); + ap_log_error(APLOG_MARK, APLOG_CRIT, server_conf, + "make_secure_socket: for %s, WSAIoctl: (SO_SSL_SET_FLAGS)", addr); + ap_unblock_alarms(); + return -1; + } + + opts.cert = key; + opts.certlen = strlen(key); + opts.sidtimeout = 0; + opts.sidentries = 0; + opts.siddir = NULL; + + if (WSAIoctl(s, SO_SSL_SET_SERVER, (char *)&opts, sizeof(opts), + NULL, 0, NULL, NULL, NULL) != 0) { + errno = WSAGetLastError(); + ap_log_error(APLOG_MARK, APLOG_CRIT, server_conf, + "make_secure_socket: for %s, WSAIoctl: (SO_SSL_SET_SERVER)", addr); + ap_unblock_alarms(); + return -1; + } + + if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *) &one, sizeof(int)) < 0) { + errno = WSAGetLastError(); + ap_log_error(APLOG_MARK, APLOG_CRIT, server_conf, + "make_secure_socket: for %s, setsockopt: (SO_REUSEADDR)", addr); + ap_unblock_alarms(); + return -1; + } + + one = 1; +#ifdef SO_KEEPALIVE + if (setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, (char *) &one, sizeof(int)) < 0) { + errno = WSAGetLastError(); + ap_log_error(APLOG_MARK, APLOG_CRIT, server_conf, + "make_secure_socket: for %s, setsockopt: (SO_KEEPALIVE)", addr); +#endif + ap_unblock_alarms(); + return -1; + } + + if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *) &no, sizeof(int)) < 0) { + errno = WSAGetLastError(); + ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, + "setsockopt: (TCP_NODELAY)"); + } + + if (server_conf->send_buffer_size) { + if (setsockopt(s, SOL_SOCKET, SO_SNDBUF, + (char *) &server_conf->send_buffer_size, sizeof(int)) < 0) { + errno = WSAGetLastError(); + ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, + "make_secure_socket: failed to set SendBufferSize for %s, " + "using default", addr); + ap_unblock_alarms(); + return -1; + } + } + + if (bind(s, (struct sockaddr *) server, sizeof(struct sockaddr_in)) == -1) { + errno = WSAGetLastError(); + ap_log_error(APLOG_MARK, APLOG_CRIT, server_conf, + "make_secure_socket: could not bind to %s", addr); + ap_unblock_alarms(); + return -1; + } + + if (listen(s, ap_listenbacklog) == -1) { + errno = WSAGetLastError(); + ap_log_error(APLOG_MARK, APLOG_ERR, server_conf, + "make_secure_socket: unable to listen for connections on %s", addr); + ap_unblock_alarms(); + return -1; + } + + ap_unblock_alarms(); + return s; +} + +static const char *set_secure_listener(cmd_parms *cmd, void *dummy, char *ips, char* key) +{ + TLSSrvConfigRec* sc = get_tls_cfg(cmd->server); + const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); + char *ports; + unsigned short port; + seclisten_rec *new; + + + if (err != NULL) + return err; + + ports = strchr(ips, ':'); + + if (ports != NULL) { + if (ports == ips) + return "Missing IP address"; + else if (ports[1] == '\0') + return "Address must end in :<port-number>"; + + *(ports++) = '\0'; + } + else { + ports = ips; + } + + new = ap_pcalloc(cmd->pool, sizeof(seclisten_rec)); + new->local_addr.sin_family = AF_INET; + + if (ports == ips) + new->local_addr.sin_addr.s_addr = htonl(INADDR_ANY); + else + new->local_addr.sin_addr.s_addr = ap_get_virthost_addr(ips, NULL); + + port = atoi(ports); + + if (!port) + return "Port must be numeric"; + + ap_table_set(sc->sltable, ports, "T"); + + new->local_addr.sin_port = htons(port); + new->fd = -1; + new->used = 0; + new->next = ap_seclisteners; + strcpy(new->key, key); + ap_seclisteners = new; + return NULL; +} + +static void InitTLS(server_rec *s, pool *p) +{ + seclisten_rec* sl; + listen_rec* lr; + + for (sl = ap_seclisteners; sl != NULL; sl = sl->next) { + sl->fd = find_secure_listener(sl); + + if (sl->fd < 0) + sl->fd = make_secure_socket(p, &sl->local_addr, sl->key, s); + else + ap_note_cleanups_for_socket(p, sl->fd); + + if (sl->fd >= 0) { + FD_SET(sl->fd, &listenfds); + ap_note_cleanups_for_socket(p, sl->fd); + + lr = ap_pcalloc(p, sizeof(listen_rec)); + + if (lr) { + lr->local_addr = sl->local_addr; + lr->used = 0; + lr->fd = sl->fd; + lr->next = ap_listeners; + ap_listeners = lr; + } + } else { + clean_parent_exit(1); + } + } +} + +void *tls_config_server_create(pool *p, server_rec *s) +{ + TLSSrvConfigRec *new = ap_palloc(p, sizeof(TLSSrvConfigRec)); + new->sltable = ap_make_table(p, 5); + return new; +} + +void *tls_config_server_merge(pool *p, void *basev, void *addv) +{ + TLSSrvConfigRec *base = (TLSSrvConfigRec *)basev; + TLSSrvConfigRec *add = (TLSSrvConfigRec *)addv; + TLSSrvConfigRec *merged = (TLSSrvConfigRec *)ap_palloc(p, sizeof(TLSSrvConfigRec)); + return merged; +} + +int tls_hook_Fixup(request_rec *r) +{ + TLSSrvConfigRec *sc = get_tls_cfg(r->server); + table *e = r->subprocess_env; + const char *s_secure; + char port[8]; + + itoa(r->server->port, port, 10); + s_secure = ap_table_get(sc->sltable, port); + + if (!s_secure) + return DECLINED; + + ap_table_set(e, "HTTPS", "on"); + + return DECLINED; +} + +static const command_rec tls_module_cmds[] = { + { "SecureListen", set_secure_listener, NULL, RSRC_CONF, TAKE2, + "specify an address and/or port with a key pair name"}, + { NULL } +}; + +module MODULE_VAR_EXPORT tls_module = +{ + STANDARD_MODULE_STUFF, + InitTLS, /* initializer */ + NULL, /* dir config creater */ + NULL, /* dir merger --- default is to override */ + tls_config_server_create, /* server config */ + tls_config_server_merge, /* merge server config */ + tls_module_cmds, /* command table */ + NULL, /* handlers */ + NULL, /* filename translation */ + NULL, /* check_user_id */ + NULL, /* check auth */ + NULL, /* check access */ + NULL, /* type_checker */ + tls_hook_Fixup, /* fixups */ + NULL, /* logger */ +}; + + diff --git a/usr.sbin/httpd/src/os/win32/BaseAddr.ref b/usr.sbin/httpd/src/os/win32/BaseAddr.ref new file mode 100644 index 00000000000..ec90ed4cd68 --- /dev/null +++ b/usr.sbin/httpd/src/os/win32/BaseAddr.ref @@ -0,0 +1,28 @@ +; os/win32/BaseAddr.ref contains the central repository +; of all module base addresses +; to avoid relocation + +; WARNING: Update this file by reviewing the image size +; of the debug-generated dll files; release images +; should fit in the larger debug-sized reservations. +; Always allow some slack (if >C000, size at 20000) +; to allow for discrepancies between builds. + +; module name base-address max-size + +ApacheCore 0x6FF60000 0x000A0000 +xmlparse 0x6FF40000 0x00020000 +xmltok 0x6FF10000 0x00030000 +mod_auth_anon 0x6FEF0000 0x00010000 +mod_auth_digest 0x6FED0000 0x00020000 +mod_cern_meta 0x6FEC0000 0x00010000 +mod_digest 0x6FEB0000 0x00010000 +mod_expires 0x6FEA0000 0x00010000 +mod_headers 0x6FE90000 0x00010000 +mod_info 0x6FE80000 0x00010000 +mod_rewrite 0x6FE60000 0x00020000 +mod_speling 0x6FE50000 0x00010000 +mod_status 0x6FE40000 0x00010000 +mod_usertrack 0x6FE30000 0x00010000 +mod_proxy 0x6FE10000 0x00020000 +mod_auth_dbm 0x6FE00000 0x00010000 diff --git a/usr.sbin/httpd/src/os/win32/monitoring-services.txt b/usr.sbin/httpd/src/os/win32/monitoring-services.txt new file mode 100644 index 00000000000..24665890257 --- /dev/null +++ b/usr.sbin/httpd/src/os/win32/monitoring-services.txt @@ -0,0 +1,94 @@ +From: William A. Rowe, Jr. +Date: June 7th '00 +Subject: service monitoring in Apache 1.3.13 + +The concept for a taskbar monitor has been thrown around +for a very long while. 1.3.13 introduced Win9x services, +and that added fuel to the mix. Here are some sideband +observations I've made for other developers... + +About Apache as a console, don't start Apache hidden without +any command line arguments if you want to launch it yourself +in a hidden window (it will do the classic test for +AllocConsole/FreeConsole)... drop in some arguments such as +the -f or -r option and it will fly without thinking it is a +service under 9x and NT. + +Rule two, don't use --ntservice as an argument, ever. Only +the Windows NT Service Control Manager is allowed to pass that +flag, and only that flag, when it runs Apache.exe. Do use +--ntservice as the sole argument to the executable name if +you are installing an Apache NT service yourself. + +Rule three, use -k start and -n name when maintaining the +HKLM/Software/Microsoft/Windows/CurrentVersion/RunServices +list, since there is no other way for Apache to know what +the service is named :) And look at any 9x installed service's +RunServices entry in the registry for the start service semantic. + +Rule four, use the WinNT Service Control Manager exclusively +for starting, stopping and restarting Apache as an NT service. +The restart signal is the value 128, as documented in service.h +and service.c - this will continue to work in Apache 2.0. If +it fails, you are handling an older version (pre 1.3.13) of +Apache, and need to stop and then start the service instead. + +Rule five, use the legacy pid-named events to signal Win9x +service Apache to restart and stop the service. But don't +bother looking for httpd.pid files... you can get the pid +right from the hidden service control window. Apache 1.3.13 +and 2.x create a hidden window named for the name of the +service (without the spaces), with a window class of +"ApacheWin95ServiceMonitor", so can use FindWindow to track +down running Win9x services. See the service.c code for how +I accomplished this pretty simply in the -k stop/-k restart +handler. + +Taskbar Monitor App +------------------- + +Basic requirements: a C code application using strictly the +Win32 API, and not MFC or other Win32 frameworks. Could use +the service.c module to share some basic functions. That +module could be extended in Apache 2.0 to make this all easier. + +I think we are looking for an external app that simply acts +as a monitor or allows a stopped service to be started. If +the user logs off, we loose the monitor app, but installed as +a shortcut in the Start group or in the registry key +HKLM/Software/Microsoft/Windows/CurrentVersion/Run +we will be just fine. I'd like to see the monitor run only +one instance to monitor all running services, for memory +and resource conservation. + +I was thinking that the hover/iconbar title would tell them +"Test service is running", or "Test service is stopped". +If they left click, they could stop or restart, or simply +start if it is stopped. There could be a preference that +each service doesn't get it's own individual task icon unless +it is running, if it is a manual start service (or missing +from the RunServices list, which is the equivilant under 9x). + +If a specific service is set to Auto start or is in the +RunServices Win9x registry key, we must show them the stopped +icon, of course. We might also keep the icon for any running +service that stops abruptly. But there could be a 'single +icon' option for the taskbar icon monitor that says show only +a single status icon, for simplicity if the administrator runs +many Apache services. + +But I was hoping that any right click would provide a menu +of all Apache services with their status. e.g. + Test service is stopped + Apache_2 service is running + MyWeb service is running +and each would do the logical submenu, same as if that +specific taskbar icon were left clicked, offering to start or +offering to stop or restart the server, as appropriate. + +Finally, to identify all installed Apache services, just query +the registry key HKLM\SYSTEM\CurrentControlSet\Services for any +key that has the ImagePath value of "...\Apache.exe"... (quotes +are significant here, if the leading quote is ommitted the +entire string ends with the text \Apache.exe - based on Apache's +own service installer in every released version.) diff --git a/usr.sbin/httpd/src/support/logresolve.dsp b/usr.sbin/httpd/src/support/logresolve.dsp new file mode 100644 index 00000000000..e5c9717eeb7 --- /dev/null +++ b/usr.sbin/httpd/src/support/logresolve.dsp @@ -0,0 +1,92 @@ +# Microsoft Developer Studio Project File - Name="logresolve" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=logresolve - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "logresolve.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "logresolve.mak" CFG="logresolve - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "logresolve - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "logresolve - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "logresolve - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\include" /I "..\os\win32" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "WIN32_LEAN_AND_MEAN" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 wsock32.lib /nologo /subsystem:console /map /machine:I386 +# SUBTRACT LINK32 /pdb:none /nodefaultlib + +!ELSEIF "$(CFG)" == "logresolve - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\include" /I "..\os\win32" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "WIN32_LEAN_AND_MEAN" /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 wsock32.lib /nologo /subsystem:console /incremental:no /map /debug /machine:I386 +# SUBTRACT LINK32 /pdb:none /nodefaultlib + +!ENDIF + +# Begin Target + +# Name "logresolve - Win32 Release" +# Name "logresolve - Win32 Debug" +# Begin Source File + +SOURCE=.\logresolve.c +# End Source File +# End Target +# End Project diff --git a/usr.sbin/httpd/src/support/logresolve.mak b/usr.sbin/httpd/src/support/logresolve.mak new file mode 100644 index 00000000000..c9253556220 --- /dev/null +++ b/usr.sbin/httpd/src/support/logresolve.mak @@ -0,0 +1,217 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on logresolve.dsp +!IF "$(CFG)" == "" +CFG=logresolve - Win32 Debug +!MESSAGE No configuration specified. Defaulting to logresolve - Win32 Debug. +!ENDIF + +!IF "$(CFG)" != "logresolve - Win32 Release" && "$(CFG)" !=\ + "logresolve - Win32 Debug" +!MESSAGE Invalid configuration "$(CFG)" specified. +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "logresolve.mak" CFG="logresolve - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "logresolve - Win32 Release" (based on\ + "Win32 (x86) Console Application") +!MESSAGE "logresolve - Win32 Debug" (based on\ + "Win32 (x86) Console Application") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(CFG)" == "logresolve - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\logresolve.exe" + +!ELSE + +ALL : "$(OUTDIR)\logresolve.exe" + +!ENDIF + +CLEAN : + -@erase "$(INTDIR)\logresolve.obj" + -@erase "$(INTDIR)\vc50.idb" + -@erase "$(OUTDIR)\logresolve.exe" + -@erase "$(OUTDIR)\logresolve.map" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "..\include" /I "..\os\win32" /D "NDEBUG"\ + /D "WIN32" /D "_CONSOLE" /D "WIN32_LEAN_AND_MEAN" /Fo"$(INTDIR)\\"\ + /Fd"$(INTDIR)\\" /FD /c +CPP_OBJS=.\Release/ +CPP_SBRS=. + +.c{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +RSC=rc.exe +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\logresolve.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=wsock32.lib /nologo /subsystem:console /incremental:no\ + /pdb:"$(OUTDIR)\logresolve.pdb" /map:"$(INTDIR)\logresolve.map" /machine:I386\ + /out:"$(OUTDIR)\logresolve.exe" +LINK32_OBJS= \ + "$(INTDIR)\logresolve.obj" + +"$(OUTDIR)\logresolve.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ELSEIF "$(CFG)" == "logresolve - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\logresolve.exe" + +!ELSE + +ALL : "$(OUTDIR)\logresolve.exe" + +!ENDIF + +CLEAN : + -@erase "$(INTDIR)\logresolve.obj" + -@erase "$(INTDIR)\vc50.idb" + -@erase "$(INTDIR)\vc50.pdb" + -@erase "$(OUTDIR)\logresolve.exe" + -@erase "$(OUTDIR)\logresolve.map" + -@erase "$(OUTDIR)\logresolve.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\include" /I "..\os\win32" /D\ + "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "WIN32_LEAN_AND_MEAN" /Fo"$(INTDIR)\\"\ + /Fd"$(INTDIR)\\" /FD /c +CPP_OBJS=.\Debug/ +CPP_SBRS=. + +.c{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +RSC=rc.exe +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\logresolve.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=wsock32.lib /nologo /subsystem:console /incremental:no\ + /pdb:"$(OUTDIR)\logresolve.pdb" /map:"$(INTDIR)\logresolve.map" /debug\ + /machine:I386 /out:"$(OUTDIR)\logresolve.exe" +LINK32_OBJS= \ + "$(INTDIR)\logresolve.obj" + +"$(OUTDIR)\logresolve.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ENDIF + + +!IF "$(CFG)" == "logresolve - Win32 Release" || "$(CFG)" ==\ + "logresolve - Win32 Debug" +SOURCE=.\logresolve.c +DEP_CPP_LOGRE=\ + "..\include\ap_config.h"\ + "..\include\ap_ctype.h"\ + "..\include\ap_mmn.h"\ + "..\include\hsregex.h"\ + "..\os\win32\os.h"\ + +NODEP_CPP_LOGRE=\ + "..\include\ap_config_auto.h"\ + + +"$(INTDIR)\logresolve.obj" : $(SOURCE) $(DEP_CPP_LOGRE) "$(INTDIR)" + + + +!ENDIF + diff --git a/usr.sbin/httpd/src/support/rotatelogs.dsp b/usr.sbin/httpd/src/support/rotatelogs.dsp new file mode 100644 index 00000000000..6ac39c9a5f7 --- /dev/null +++ b/usr.sbin/httpd/src/support/rotatelogs.dsp @@ -0,0 +1,90 @@ +# Microsoft Developer Studio Project File - Name="rotatelogs" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=rotatelogs - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "rotatelogs.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "rotatelogs.mak" CFG="rotatelogs - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "rotatelogs - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "rotatelogs - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "rotatelogs - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\include" /I "..\os\win32" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 /nologo /subsystem:console /map /machine:I386 + +!ELSEIF "$(CFG)" == "rotatelogs - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\include" /I "..\os\win32" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:console /incremental:no /map /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "rotatelogs - Win32 Release" +# Name "rotatelogs - Win32 Debug" +# Begin Source File + +SOURCE=.\rotatelogs.c +# End Source File +# End Target +# End Project diff --git a/usr.sbin/httpd/src/support/rotatelogs.mak b/usr.sbin/httpd/src/support/rotatelogs.mak new file mode 100644 index 00000000000..a1c24de73c9 --- /dev/null +++ b/usr.sbin/httpd/src/support/rotatelogs.mak @@ -0,0 +1,216 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on rotatelogs.dsp +!IF "$(CFG)" == "" +CFG=rotatelogs - Win32 Debug +!MESSAGE No configuration specified. Defaulting to rotatelogs - Win32 Debug. +!ENDIF + +!IF "$(CFG)" != "rotatelogs - Win32 Release" && "$(CFG)" !=\ + "rotatelogs - Win32 Debug" +!MESSAGE Invalid configuration "$(CFG)" specified. +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "rotatelogs.mak" CFG="rotatelogs - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "rotatelogs - Win32 Release" (based on\ + "Win32 (x86) Console Application") +!MESSAGE "rotatelogs - Win32 Debug" (based on\ + "Win32 (x86) Console Application") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(CFG)" == "rotatelogs - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\rotatelogs.exe" + +!ELSE + +ALL : "$(OUTDIR)\rotatelogs.exe" + +!ENDIF + +CLEAN : + -@erase "$(INTDIR)\rotatelogs.obj" + -@erase "$(INTDIR)\vc50.idb" + -@erase "$(OUTDIR)\rotatelogs.exe" + -@erase "$(OUTDIR)\rotatelogs.map" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "..\include" /I "..\os\win32" /D "WIN32" /D\ + "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c +CPP_OBJS=.\Release/ +CPP_SBRS=. + +.c{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +RSC=rc.exe +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\rotatelogs.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=/nologo /subsystem:console /incremental:no\ + /pdb:"$(OUTDIR)\rotatelogs.pdb" /map:"$(INTDIR)\rotatelogs.map" /machine:I386\ + /out:"$(OUTDIR)\rotatelogs.exe" +LINK32_OBJS= \ + "$(INTDIR)\rotatelogs.obj" + +"$(OUTDIR)\rotatelogs.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ELSEIF "$(CFG)" == "rotatelogs - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\rotatelogs.exe" + +!ELSE + +ALL : "$(OUTDIR)\rotatelogs.exe" + +!ENDIF + +CLEAN : + -@erase "$(INTDIR)\rotatelogs.obj" + -@erase "$(INTDIR)\vc50.idb" + -@erase "$(INTDIR)\vc50.pdb" + -@erase "$(OUTDIR)\rotatelogs.exe" + -@erase "$(OUTDIR)\rotatelogs.map" + -@erase "$(OUTDIR)\rotatelogs.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\include" /I "..\os\win32" /D\ + "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\"\ + /FD /c +CPP_OBJS=.\Debug/ +CPP_SBRS=. + +.c{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +RSC=rc.exe +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\rotatelogs.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=/nologo /subsystem:console /incremental:no\ + /pdb:"$(OUTDIR)\rotatelogs.pdb" /map:"$(INTDIR)\rotatelogs.map" /debug\ + /machine:I386 /out:"$(OUTDIR)\rotatelogs.exe" /pdbtype:sept +LINK32_OBJS= \ + "$(INTDIR)\rotatelogs.obj" + +"$(OUTDIR)\rotatelogs.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ENDIF + + +!IF "$(CFG)" == "rotatelogs - Win32 Release" || "$(CFG)" ==\ + "rotatelogs - Win32 Debug" +SOURCE=.\rotatelogs.c +DEP_CPP_ROTAT=\ + "..\include\ap_config.h"\ + "..\include\ap_ctype.h"\ + "..\include\ap_mmn.h"\ + "..\include\hsregex.h"\ + "..\os\win32\os.h"\ + +NODEP_CPP_ROTAT=\ + "..\include\ap_config_auto.h"\ + + +"$(INTDIR)\rotatelogs.obj" : $(SOURCE) $(DEP_CPP_ROTAT) "$(INTDIR)" + + + +!ENDIF + |