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

📄 httpd.conf.example

📁 Network Administration Visualized 网络管理可视化源码
💻 EXAMPLE
字号:
## How your server behaves.  This can be wildly different on# your system.#ServerType standaloneServerRoot "/etc/httpd"PidFile /var/run/httpd.pidScoreBoardFile /var/log/httpd/httpd.scoreboardTimeout 60KeepAlive OnMaxKeepAliveRequests 100KeepAliveTimeout 15MinSpareServers 3MaxSpareServers 5StartServers 2MaxClients 256MaxRequestsPerChild 100000UseCanonicalName onExtendedStatus OnPort 80Listen 80User httpdGroup httpd## Load some modules#LoadModule cgi_module         libexec/mod_cgi.soLoadModule mime_magic_module  libexec/mod_mime_magic.soLoadModule mime_module        libexec/mod_mime.soLoadModule access_module      libexec/mod_access.soLoadModule auth_module        libexec/mod_auth.soLoadModule rewrite_module     libexec/mod_rewrite.soLoadModule ssl_module         libexec/libssl.soLoadModule php4_module        libexec/libphp4.soLoadModule python_module      libexec/mod_python.so## MIME and type related config#DefaultType text/plainAddType application/x-httpd-php .phpAddType application/x-httpd-php-source .phps## Some server specifics#ServerName nav.example.comServerAdmin webmaster@nav.example.comDocumentRoot "/usr/local/nav/apache/webroot"## The following directives define some format nicknames for use with# a CustomLog directive (see below).#LogFormat "%V %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 /var/log/httpd/access_log combinedErrorLog /var/log/httpd/error_logLogLevel infoServerSignature OnHostnameLookups Off## Global SSL Configuration#<IfModule mod_ssl.c>    Listen 443    AddType                 application/x-x509-ca-cert .crt    AddType                 application/x-pkcs7-crl    .crl    SSLPassPhraseDialog     builtin    SSLSessionCache         dbm:/var/log/httpd/ssl_scache    SSLSessionCacheTimeout  300    SSLMutex                file:/var/log/httpd/ssl_mutex    SSLRandomSeed           startup builtin    SSLRandomSeed           connect builtin    SSLLog                  /var/log/httpd/ssl_engine_log    SSLLogLevel             info</IfModule>## Reasonable Rewrite rules#<IfModule mod_rewrite.c>    #    # We use this rewrite rule stuff to make sure that the client uses    # the FQDN for this host when making its requests (among other    # things, due to cookie access problems under NAV)    #    RewriteEngine on    RewriteLog logs/rewrite.log    RewriteCond %{HTTP_HOST} !^nav.example.org$    RewriteRule ^/(.*) https://nav.example.org/$1 [R=301]    #    # If the request was not made using SSL, we forcefully redirect    # the user's requst to an https url    #    RewriteCond %{HTTPS} !^on$    RewriteRule ^/(.*) https://nav.example.org/$1 [R=301]</IfModule>## Access privileges#<Directory />    Options FollowSymLinks    AllowOverride None</Directory>AccessFileName .htaccess<Files ~ "^\.ht">    Order allow,deny    Deny from all</Files><IfModule mod_setenvif.c>    BrowserMatch "Mozilla/2" nokeepalive    BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0    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><Directory /usr/local/nav/apache/webroot>    Options Indexes FollowSymLinks MultiViews ExecCGI    DirectoryIndex index.html index.php index.cgi    AllowOverride All</Directory>#### SSL Virtual host config##<IfModule mod_ssl.c><VirtualHost _default_:443>  SSLEngine on  SSLCertificateFile conf/cert/nav.cert  SSLCertificateKeyFile conf/cert/nav.key  SetEnvIf User-Agent ".*MSIE.*" \    nokeepalive ssl-unclean-shutdown \    downgrade-1.0 force-response-1.0</VirtualHost></IfModule>

⌨️ 快捷键说明

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