📄 asg02.htm
字号:
## automatically convert every GIF to another file type.
Module asis_module mod_asis.o
Module imap_module mod_imap.o
Module action_module mod_actions.o
## Optional modules for NCSA user-agent/referer logging compatibility
## We recommend, however, that you migrate to the configurable logging
## module, below.
# Module agent_log_module mod_log_agent.o
# Module referer_log_module mod_log_referer.o
## This is a *replacement* for mod_log_common which supports a
## LogFormat directive which allows you to specify what goes into
## the TransferLog (if you want Referer, etc.) source code for docs.
##
## If you play with this, remember to drop the standard
## mod_log_common --- a server with both will work, but you'll get
## very confused trying to figure out what's going on...
# Module config_log_module mod_log_config.o
## cern_meta mimicks the behavior of the CERN web server with regards to
## metainformation files.
# Module cern_meta_module mod_cern_meta.o
## The status module allows the server to display current details about
## how well it is performing and what it is doing. Consider also enabling
## -DSTATUS (see the CFLAGS section near the start of the file) to allow
## full status information. Check conf/access.conf on how to enable this.
# Module status_module mod_status.o
## The Info module displays configuration information for the server and
## all included modules. It's very useful for debugging.
# Module info_module mod_info.o
## Optional authentication modules.
##
## The anon_auth module allows for anonymous-FTP-style username/
## password authentication.
# Module anon_auth_module mod_auth_anon.o
## db_auth and dbm_auth work with Berkeley DB files - make sure there
## is support for DBM files on your system. You may need to grab the GNU
## "gdbm" package if not.
# Module db_auth_module mod_auth_db.o
# Module dbm_auth_module mod_auth_dbm.o
## msql_auth checks against an MSQL database. You must have MSQL installed
## and an "msql.h" available for this to even compile. Additionally,
## you may need to add a couple entries to the CFLAGS line, like
##
## -lmsql -L/usr/local/lib -L/usr/local/Minerva/lib
##
## This depends on your installation of MSQL.
# Module msql_auth_module mod_auth_msql.o
## "digest" implements HTTP Digest Authentication rather than the less
## secure Basic Auth used by the other modules.
# Module digest_module mod_digest.o
## Outright experiments --- mod_dld defines commands which
## allows other modules to be loaded in at runtime, and mod_cookies
## uses Netscape cookies to automatically construct and log accurate
## click-trails from Netscape cookies, for Netscape-using clients who
## aren't coming in via proxy.
# Module dld_module mod_dld.o
# Module cookies_module mod_cookies.o
## Finally, the proxy module. It's not as complete as it could
## be yet, so use at your own risk.
# Module proxy_module mod_proxy.o</FONT></PRE>
<BR>
<A NAME="E69E15"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>The Server Configuration File: </B><B>conf/httpd.conf</B></FONT></CENTER></H4>
<BR>
<PRE>
<FONT COLOR="#000080"># This is the main server configuration file. See URL http://www.apache.org/
# for instructions.
# Do NOT simply read the instructions in here without understanding
# what they do, if you are unsure consult the online docs. You have been
# warned.
# Originally by Rob McCool
# ServerType is either inetd, or standalone.
ServerType standalone
# If you are running from inetd, go to "ServerAdmin".
# Port: The port the standalone listens to. For ports < 1023, you will
# need httpd to be run as root initially.
Port 80
# HostnameLookups: Log the names of clients or just their IP numbers
# e.g. www.apache.org (on) or 204.62.129.132 (off)
HostnameLookups on
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
# User/Group: The name (or #number) of the user/group to run httpd as.
# On SCO (ODT 3) use User nouser and Group nogroup
User nobody
Group #-1
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.
ServerAdmin you@your.address
# ServerRoot: The directory the server's config, error, and log files
# are kept in
ServerRoot /usr/local/etc/httpd
# BindAddress: You can support virtual hosts with this option. This option
# 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 directive.
#BindAddress *
# ErrorLog: The location of the error log file. If this does not start
# with /, ServerRoot is prepended to it.
ErrorLog logs/error_log
# TransferLog: The location of the transfer log file. If this does not
# start with /, ServerRoot is prepended to it.
TransferLog logs/access_log
# PidFile: The file the server should log its pid to
PidFile logs/httpd.pid
# ScoreBoardFile: File used to store internal server process information
ScoreBoardFile logs/apache_status
# 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.
#ServerName new.host.name
# 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
# Timeout: The number of seconds before receives and sends time out
# n.b. the compiled default is 1200 (20 minutes !)
Timeout 400
# KeepAlive: The number of Keep-Alive persistent requests to accept
# per connection. Set to 0 to deactivate Keep-Alive support
KeepAlive 5
# KeepAliveTimeout: Number of seconds to wait for the next request
KeepAliveTimeout 15
# Server-pool size regulation. Rather than making you guess how many
# server processes you need, Apache dynamically adapts to the load it
# sees --- that is, it tries to maintain enough server processes to
# handle the current load, plus a few spare servers to handle transient
# load spikes (e.g., multiple simultaneous requests from a single
# Netscape browser).
# It does this by periodically checking how many servers are waiting
# for a request. If there are fewer than MinSpareServers, it creates
# a new spare. If there are more than MaxSpareServers, some of the
# spares die off. These values are probably OK for most sites ---
MinSpareServers 5
MaxSpareServers 10
# Number of servers to start --- should be a reasonable ballpark figure.
StartServers 5
# Limit on total number of servers running, i.e., limit on the number
# of clients who can simultaneously connect --- if this limit is ever
# reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
# It is intended mainly as a brake to keep a runaway server from taking
# Unix with it as it spirals down...
MaxClients 150
# 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. On most systems, this
# isn't really needed, but a few (such as Solaris) do have notable leaks
# in the libraries.
MaxRequestsPerChild 30
# Proxy Server directives. Uncomment the following line to
# enable the proxy server:
#ProxyRequests On
# To enable the cache as well, edit and uncomment the following lines:
#CacheRoot /usr/local/etc/httpd/proxy
#CacheSize 5
#CacheGcInterval 4
#CacheMaxExpire 24
#CacheLastModifiedFactor 0.1
#CacheDefaultExpire 1
#NoCache adomain.com anotherdomain.edu joes.garage.com
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the VirtualHost command
#Listen 3000
#Listen 12.34.56.78:80
# VirtualHost: Allows the daemon to respond to requests for more than one
# server address, if your server machine is configured to accept IP packets
# for multiple addresses. This can be accomplished with the ifconfig
# alias flag, or through kernel patches like VIF.
# Any httpd.conf or srm.conf directive may go into a VirtualHost command.
# See alto the BindAddress entry.
#<VirtualHost host.foo.com>
#ServerAdmin webmaster@host.foo.com
#DocumentRoot /www/docs/host.foo.com
#ServerName host.foo.com
#ErrorLog logs/host.foo.com-error_log
#TransferLog logs/host.foo.com-access_log
#</VirtualHost></FONT></PRE>
<BR>
<A NAME="E69E16"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>The Resource Configuration File:</B><B> conf/srm.conf</B></FONT></CENTER></H4>
<BR>
<PRE>
<FONT COLOR="#000080"># With this document, you define the name space that users see of your http
# server. This file also defines server settings which affect how requests are
# serviced, and how results should be formatted.
# See the tutorials at http://www.apache.org/ for
# more information.
# Originally by Rob McCool; Adapted for Apache
# 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 /usr/local/etc/httpd/htdocs
# UserDir: The name of the directory which is appended onto a user's home
# directory if a ~user request is recieved.
UserDir public_html
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
DirectoryIndex index.html
# FancyIndexing is whether you want fancy directory indexing or standard
FancyIndexing on
# AddIcon tells the server which icon to show for different files or filename
# extensions
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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -