网站运营
位置:首页>> 网站运营>> apache 局域网访问配置方案第1/2页

apache 局域网访问配置方案第1/2页

  发布时间:2023-11-02 15:33:20 

标签:apache,局域网,配置

#  

# This is the main Apache HTTP server configuration file.  It contains the  

# configuration directives that give the server its instructions.  

# See <URL:http://httpd.apache.org/docs/2.2/> for detailed information.  

# In particular, see   

# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>  

# for a discussion of each configuration directive.  

#  

# 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.    

#  

# Configuration and logfile names: If the filenames you specify for many  

# of the server's control files begin with "/" (or "drive:/" for Win32), 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 "g:/AppServ/Apache2.2" will be interpreted by the  

# server as "g:/AppServ/Apache2.2/logs/foo.log".  

#  

# NOTE: Where filenames are specified, you must use forward slashes  

# instead of backslashes (e.g., "c:/apache" instead of "c:\apache").  

# If a drive letter is omitted, the drive on which Apache.exe is located  

# will be used by default.  It is recommended that you always supply  

# an explicit drive letter in absolute paths, however, to avoid  

# confusion.  

#  

 

# prefork MPM  

# StartServers: number of server processes to start  

# MinSpareServers: minimum number of server processes which are kept spare  

# MaxSpareServers: maximum number of server processes which are kept spare  

# MaxClients: maximum number of server processes allowed to start  

# MaxRequestsPerChild: maximum number of requests a server process serves   

<IfModule mpm_prefork_module>   

    StartServers          5   

    MinSpareServers       5   

    MaxSpareServers      10   

    MaxClients          150   

    MaxRequestsPerChild   0   

</IfModule>  

 

# ThreadsPerChild: constant number of worker threads in the server process  

# MaxRequestsPerChild: maximum  number of requests a server process serves  

#ThreadsPerChild 250   

MaxRequestsPerChild  0  

 

#  

# ServerRoot: The top of the directory tree under which the server's  

# configuration, error, and log files are kept.  

#  

# Do not add a slash at the end of the directory path.  If you point  

# ServerRoot at a non-local disk, be sure to point the LockFile directive  

# at a local disk.  If you wish to share the same ServerRoot for multiple  

# httpd daemons, you will need to change at least LockFile and PidFile.  

#   

ServerRoot "g:/AppServ/Apache2.2" 

 

#  

# Listen: Allows you to bind Apache to specific IP addresses and/or  

# ports, instead of the default. See also the <VirtualHost>  

# directive.  

#  

# Change this to Listen on specific IP addresses as shown below to   

# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)  

#  

#Listen 192.168.1.4:80   

Listen 80  

 

#  

# This configuration file reflects default settings for Apache HTTP Server.  

#  

# You may change these, but chances are that you may not need to.  

#  

 

#  

# 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 5  

 

#  

# UseCanonicalName: Determines how Apache constructs self-referencing   

# URLs and the SERVER_NAME and SERVER_PORT variables.  

# When set "Off", Apache will use the Hostname and Port supplied  

# by the client.  When set "On", Apache will use the value of the  

# ServerName directive.  

#   

UseCanonicalName Off  

 

#  

# AccessFileName: The name of the file to look for in each directory  

# for additional configuration directives.  See also the AllowOverride   

# directive.  

#   

AccessFileName .htaccess  

 

#  

# ServerTokens  

# This directive configures what you return as the Server HTTP response  

# Header. The default is 'Full' which sends information about the OS-Type  

# and compiled in modules.  

# Set to one of:  Full | OS | Minor | Minimal | Major | Prod  

# where Full conveys the most information, and Prod the least.  

#   

ServerTokens Full  

 

#  

# Optionally add a line containing the server version and virtual host  

# name to server-generated pages (internal error documents, FTP directory   

# listings, mod_status and mod_info output etc., but not CGI generated   

# documents or custom error documents).  

# Set to "EMail" to also include a mailto: link to the ServerAdmin.  

# Set to one of:  On | Off | EMail  

#   

ServerSignature On  

 

#  

# 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  

 

#  

# 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.  

# Statically compiled modules (those listed by `httpd -l') do not need  

# to be loaded here.  

#  

# Example:  

# LoadModule foo_module modules/mod_foo.so  

#   

LoadModule actions_module modules/mod_actions.so   

LoadModule alias_module modules/mod_alias.so   

LoadModule asis_module modules/mod_asis.so   

LoadModule auth_basic_module modules/mod_auth_basic.so  

#LoadModule auth_digest_module modules/mod_auth_digest.so  

#LoadModule authn_anon_module modules/mod_authn_anon.so  

#LoadModule authn_dbm_module modules/mod_authn_dbm.so   

LoadModule authn_default_module modules/mod_authn_default.so   

LoadModule authn_file_module modules/mod_authn_file.so  

#LoadModule authz_dbm_module modules/mod_authz_dbm.so   

LoadModule authz_default_module modules/mod_authz_default.so   

LoadModule authz_groupfile_module modules/mod_authz_groupfile.so   

LoadModule authz_host_module modules/mod_authz_host.so   

LoadModule authz_user_module modules/mod_authz_user.so   

LoadModule autoindex_module modules/mod_autoindex.so  

#LoadModule cern_meta_module modules/mod_cern_meta.so   

LoadModule cgi_module modules/mod_cgi.so  

#LoadModule dav_module modules/mod_dav.so  

#LoadModule dav_fs_module modules/mod_dav_fs.so  

#LoadModule deflate_module modules/mod_deflate.so   

LoadModule dir_module modules/mod_dir.so   

LoadModule env_module modules/mod_env.so  

#LoadModule expires_module modules/mod_expires.so  

#LoadModule file_cache_module modules/mod_file_cache.so  

#LoadModule headers_module modules/mod_headers.so   

LoadModule imagemap_module modules/mod_imagemap.so   

LoadModule include_module modules/mod_include.so  

#LoadModule info_module modules/mod_info.so   

LoadModule isapi_module modules/mod_isapi.so   

LoadModule log_config_module modules/mod_log_config.so   

LoadModule mime_module modules/mod_mime.so  

#LoadModule mime_magic_module modules/mod_mime_magic.so  

#LoadModule proxy_module modules/mod_proxy.so  

#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so  

#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so  

#LoadModule proxy_connect_module modules/mod_proxy_connect.so  

#LoadModule proxy_http_module modules/mod_proxy_http.so  

#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so   

LoadModule negotiation_module modules/mod_negotiation.so  

#LoadModule rewrite_module modules/mod_rewrite.so   

LoadModule setenvif_module modules/mod_setenvif.so  

#LoadModule speling_module modules/mod_speling.so  

#LoadModule status_module modules/mod_status.so  

#LoadModule unique_id_module modules/mod_unique_id.so   

LoadModule userdir_module modules/mod_userdir.so  

#LoadModule usertrack_module modules/mod_usertrack.so  

#LoadModule vhost_alias_module modules/mod_vhost_alias.so  

#LoadModule ssl_module modules/mod_ssl.so   

LoadModule php5_module g:/AppServ\php5\php5apache2_2.dll  

 

# '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.  

#  

 

#  

# ServerAdmin: Your address, where problems with the server should be  

# e-mailed.  This address appears on some server-generated pages, such  

# as error documents.  e.g. admin@your-domain.com  

#   

ServerAdmin admin@jswkj.com  

 

#  

# ServerName gives the name and port that the server uses to identify itself.  

# This can often be determined automatically, but we recommend you specify  

# it explicitly to prevent problems during startup.  

#  

# If your host doesn't have a registered DNS name, enter its IP address here.  

#   

ServerName 192.168.1.4  

#BindAddress 192.168.1.4   

 

#  

# 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 "g:/AppServ/www" 

 

#  

# 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   

# features.    

#   

<Directory />   

    Options FollowSymLinks ExecCGI Indexes   

    AllowOverride None   

    Order deny,allow   

    Deny from all   

    Satisfy all   

</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 "g:/AppServ/www">  

    #  

    # Possible values for the Options directive are "None", "All",  

    # or any combination of:  

    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews  

    #  

    # Note that "MultiViews" must be named *explicitly* --- "Options All"  

    # doesn't give it to you.  

    #  

    # The Options directive is both complicated and important.  Please see  

    # http://httpd.apache.org/docs/2.2/mod/core.html#options  

    # for more information.  

    #   

    Options Indexes FollowSymLinks MultiViews ExecCGI  

 

    #  

    # AllowOverride controls what directives may be placed in .htaccess files.  

    # It can be "All", "None", or any combination of the keywords:  

    #   Options FileInfo AuthConfig Limit  

    #   

    AllowOverride All  

 

    #  

    # Controls who can get stuff from this server.  

    #   

    Order allow,deny   

    Allow from all   

  

</Directory>  

 

#  

# DirectoryIndex: sets the file that Apache will serve if a directory  

# is requested.  

#   

<IfModule dir_module>   

    DirectoryIndex index.php index.html index.htm   

</IfModule>  

 

#  

# The following lines prevent .htaccess and .htpasswd files from being   

# viewed by Web clients.   

#   

<FilesMatch "^\.ht">   

    Order allow,deny   

    Deny from all   

</FilesMatch>  

 

#  

# 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   

  

<IfModule log_config_module>  

    #  

    # 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   

  

    <IfModule logio_module>  

      # You need to enable mod_logio.c to use %I and %O   

      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio   

    </IfModule>  

 

    #  

    # 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   

 

12下一页阅读全文

0
投稿

猜你喜欢

  • 2009年9月8日,专业的博客软件提供商北京傲博致远软件隆重推出Oblog.NET2.0版。至此,饱含数万OBLOG站长热切期盼和支持的.N
  • 摘要:虚拟机安装时一般都采用最小化安装,默认没有lspci工具。一台测试虚拟网卡性能的虚拟机,需要lspci工具来查看网卡的类型。本文描述了
  • 网站字体的选择,对于大多数中文网站设计人员来说,根本就不是什么问题。但是放到英文站点的设计上,呵呵,问题就不少了。经常看到一些外贸网站,英文
  • 作为一个网管员,你是否知道在你的主机或服务器上发生的事情——谁来访问过?他们都做过些什么?目的是什么?什么?你不知道!其实Windows 2
  • 我们有一些想做网站的站长们还有刚步入站长行业的朋友们,你们是否经常会为一些能买到称心空间而在发愁呢?刚做网站肯定不能投资太多资金了,所以我们
  • 一次在网上闲逛,突然看到论坛有一条消息说有一种方法,可以让已经关闭的Linux机器继续运行ipchains,并且让这台机器继续实现防火墙的功
  • 网站程序上传到服务器的各种方法汇总,制作好网页程序后,如何把网页上传到申请的空间呢?为初学者做一个汇总。上传的定义 上传就是将信息从个人计算
  • 每一种操作系统都是由成千上万个不同种类的文件所组成的。其中有系统本身自带的文件,用户自己的文件,还有共享文件等等。我们有时候经常忘记某份文件
  • 大概一年之前也出了一个sandbox效应作用,但那时的sandbox效应跟现在是完全相反. 之前的sandbox效应,笔者也建立验证了其真实
  • 7月11日消息,近日Google公布了一份网页统计报告,数据来源为Google索引的42亿个网页。网页的平均容量是320KB,(包含内嵌脚本
  • 已经习惯每天到这个网站来看一看,就像习惯于每天上新浪看新闻一样!有不少愤青说,新浪的新闻尽是歌舞升平,报喜的多报忧的少,站长网似乎有点反过来
  • 随着互联网的快速发展,网购,这个名词对于广大网民来说已经是再熟悉不过了。只要上网,必定穿梭在网上人家的大街小巷之中。可以说互联网上的B2B,
  • 今日,据国外媒体报道,一家名为Powerset的创业公司正开发能采用“自然语言”的搜索技术,以取代当前流行的“关键词”搜索方式。这个信号无疑
  • 通过版本:Discuz! X1.5解决方法:UCENTER的数据备份页面,点击 Discuz! Board---》》进入 编辑应用 页面 -
  • 07年3月,当cn域名只要1元钱注册的时候,相信也是中国网站数量爆发式增长的时刻,但增长直接导致了个人站长投放最广泛的adsense单价下降
  • Discuz!X自它诞生以来就饱受争议,无论是正面的还是侧面的,它被康盛推出了,那么,它就有他的优势之所在,而discuz作为我们站长运营过
  • 引言:网站PR值(Page Rank)在网站优化和搜索引擎排名中起到一个不小的作用,就本人对PR 更新的预测,特地和大家分享一下.googl
  • 全新推出的Discuz! 7.2版本从用户注册登陆应用、社区论坛前后管理两方面着眼,增加和改进了30多处与社区门户运营密切的功能与细节,实现
  • 服务器虚拟化只需要较少的硬件资源就能运行多重应用程序和操作系统,能允许用户根据自身需求快速调配新的资源。但是这些灵活性也导致网络和安全管理者
  • 随着站点规模的扩大,在线人数的上升,免费空间已经不适用了,就很有必要为自己选择一款收费空间,下面先简单介绍下国外的主机类型,大致分这么几种,
手机版 网站运营 asp之家 www.aspxhome.com