⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 httpd2.conf.example

📁 Network Administration Visualized 网络管理可视化源码
💻 EXAMPLE
字号:
# $Id: httpd2.conf.example 2854 2004-07-06 12:15:50Z mortenv $## Example configuration file for Apache 2 running a NAV 3 web site.# This configuration uses the regular mod_cgi to run perl scripts (such as# Cricket) instead of mod_perl.  It is probably a good idea to configure use of# mod_perl for the sake of performance if extensive usage of Cricket is# anticipated.## Instances of SERVER.NAME.HERE must be replaced by your servers fully# qualified domain name.#ServerTokens OSServerRoot "/usr/local/apache2"PidFile run/httpd.pidTimeout 300KeepAlive OffMaxKeepAliveRequests 100KeepAliveTimeout 15<IfModule prefork.c>StartServers       8MinSpareServers    5MaxSpareServers   20MaxClients       150MaxRequestsPerChild  1000</IfModule><IfModule worker.c>StartServers         2MaxClients         150MinSpareThreads     25MaxSpareThreads     75 ThreadsPerChild     25MaxRequestsPerChild  0</IfModule><IfModule perchild.c>NumServers           5StartThreads         5MinSpareThreads      5MaxSpareThreads     10MaxThreadsPerChild  20MaxRequestsPerChild  0</IfModule>User apacheGroup apacheServerAdmin root@itea.ntnu.noServerName SERVER.NAME.HEREUseCanonicalName OffDocumentRoot "/usr/local/nav/apache/webroot"Listen 80## Uncomment these if they were compiled as loadable modules.# These are usually compiled as internal modules in a default Apache# build.##LoadModule access_module modules/mod_access.so#LoadModule auth_module modules/mod_auth.so#LoadModule include_module modules/mod_include.so#LoadModule log_config_module modules/mod_log_config.so#LoadModule env_module modules/mod_env.so#LoadModule setenvif_module modules/mod_setenvif.so#LoadModule mime_module modules/mod_mime.so#LoadModule status_module modules/mod_status.so#LoadModule autoindex_module modules/mod_autoindex.so#LoadModule asis_module modules/mod_asis.so#LoadModule negotiation_module modules/mod_negotiation.so#LoadModule dir_module modules/mod_dir.so#LoadModule actions_module modules/mod_actions.so#LoadModule alias_module modules/mod_alias.so#LoadModule rewrite_module modules/mod_rewrite.so<IfModule prefork.c>#LoadModule cgi_module modules/mod_cgi.so</IfModule><IfModule worker.c>#LoadModule cgid_module modules/mod_cgid.so</IfModule><Directory />    Options FollowSymLinks    AllowOverride None</Directory><Directory "/usr/local/nav/apache/webroot">    Options Indexes FollowSymLinks ExecCGI    AllowOverride All    Order allow,deny    Allow from all</Directory><LocationMatch "^/+$">    Options -Indexes    ErrorDocument 403 /error/noindex.html</LocationMatch><IfModule mod_userdir.c>    UserDir disable</IfModule>DirectoryIndex index.html index.html.var index.php index.cgiAccessFileName .htaccess<Files ~ "^\.ht">    Order allow,deny    Deny from all</Files>TypesConfig /etc/mime.typesDefaultType text/plain<IfModule mod_mime_magic.c>    MIMEMagicFile conf/magic</IfModule>HostnameLookups OffErrorLog logs/error_logLogLevel warnLogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combinedLogFormat "%h %l %u %t \"%r\" %>s %b" commonLogFormat "%{Referer}i -> %U" refererLogFormat "%{User-agent}i" agentCustomLog logs/access_log combinedServerSignature OnAlias /icons/ "/var/www/icons/"<Directory "/var/www/icons">    Options Indexes MultiViews    AllowOverride None    Order allow,deny    Allow from all</Directory>DefaultIcon /icons/unknown.gifIndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,tAddEncoding x-compress ZAddEncoding x-gzip gz tgzAddLanguage en .enAddLanguage no .noLanguagePriority en no ForceLanguagePriority Prefer FallbackAddDefaultCharset UTF-8AddCharset ISO-8859-1  .iso8859-1  .latin1AddCharset WINDOWS-1251 .cp-1251   .win-1251AddCharset CP866       .cp866AddCharset UTF-8       .utf8AddCharset utf-8       .utf8AddType application/x-tar .tgzAddHandler cgi-script .cgiAddHandler imap-file mapAddHandler type-map varAddOutputFilter INCLUDES .shtmlAlias /error/ "/var/www/error/"<IfModule mod_negotiation.c><IfModule mod_include.c>    <Directory "/var/www/error">        AllowOverride None        Options IncludesNoExec        AddOutputFilter Includes html        AddHandler type-map var        Order allow,deny        Allow from all        LanguagePriority en no        ForceLanguagePriority Prefer Fallback    </Directory>    ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var    ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var    ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var    ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var    ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var    ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var    ErrorDocument 410 /error/HTTP_GONE.html.var    ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var    ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var    ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var    ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var    ErrorDocument 415 /error/HTTP_SERVICE_UNAVAILABLE.html.var    ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var    ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var    ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var    ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var    ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var</IfModule></IfModule>## The following directives modify normal HTTP response behavior to# handle known problems with browser implementations.#BrowserMatch "Mozilla/2" nokeepaliveBrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0BrowserMatch "RealPlayer 4\.0" force-response-1.0BrowserMatch "Java/1\.0" force-response-1.0BrowserMatch "JDK/1\.0" force-response-1.0## The following directive disables redirects on non-GET requests for# a directory that does not include the trailing slash.  This fixes a # problem with Microsoft WebFolders which does not appropriately handle # redirects for folders with DAV methods.#BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefullyBrowserMatch "^WebDrive" redirect-carefullyLoadModule python_module modules/mod_python.soLoadModule php4_module modules/libphp4.so# Unless mod_php was compiled with Apache 2 filter support, this is# the way to associate php files with mod_php:AddType application/x-httpd-php .php## SSL Configuration# Uncomment LoadModule directive if mod_ssl was compiled as a loadable module##LoadModule ssl_module modules/mod_ssl.soListen 443AddType application/x-x509-ca-cert .crtAddType application/x-pkcs7-crl    .crlSSLPassPhraseDialog  builtinSSLSessionCache         dbm:/var/cache/httpd/scacheSSLSessionCacheTimeout  300SSLMutex  file:logs/ssl_mutexSSLRandomSeed startup builtinSSLRandomSeed connect builtin#### SSL Virtual Host Context##<VirtualHost _default_:443>DocumentRoot "/usr/local/nav/apache/webroot"ServerName SERVER.NAME.HERE:443ServerAdmin root@localhostErrorLog logs/ssl_error_logTransferLog logs/ssl_access_logSSLEngine onSSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULLSSLCertificateFile /usr/local/apache2/conf/ssl.crt/server.crtSSLCertificateKeyFile /usr/local/apache2/conf/ssl.key/server.key<Files ~ "\.(cgi|shtml|phtml|php3?)$">    SSLOptions +StdEnvVars</Files>SetEnvIf User-Agent ".*MSIE.*" \         nokeepalive ssl-unclean-shutdown \         downgrade-1.0 force-response-1.0CustomLog logs/ssl_request_log \          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"</VirtualHost>                                  <IfModule mod_rewrite.c>    RewriteEngine on    RewriteLog logs/rewrite.log    # We make sure the full host name is always used, so that cookies are    # always valid through internal redirects on the NAV website.    RewriteCond %{HTTP_HOST} !^SERVER.NAME.HERE$    RewriteRule ^/(.*) https://SERVER.NAME.HERE/$1 [R=301]    # We force the client to use the SSL server for security.    RewriteCond %{HTTPS} !^on$    RewriteRule ^/(.*) https://SERVER.NAME.HERE/$1 [R=301]</IfModule>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -