<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://kangwuyi.com/index.php?action=history&amp;feed=atom&amp;title=%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95%2F%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85%E4%B8%8E%E5%8D%87%E7%BA%A7%2FApache2%E9%85%8D%E7%BD%AE</id>
	<title>使用方法/系统安装与升级/Apache2配置 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://kangwuyi.com/index.php?action=history&amp;feed=atom&amp;title=%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95%2F%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85%E4%B8%8E%E5%8D%87%E7%BA%A7%2FApache2%E9%85%8D%E7%BD%AE"/>
	<link rel="alternate" type="text/html" href="https://kangwuyi.com/index.php?title=%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95/%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85%E4%B8%8E%E5%8D%87%E7%BA%A7/Apache2%E9%85%8D%E7%BD%AE&amp;action=history"/>
	<updated>2026-11-30T15:28:26Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://kangwuyi.com/index.php?title=%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95/%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85%E4%B8%8E%E5%8D%87%E7%BA%A7/Apache2%E9%85%8D%E7%BD%AE&amp;diff=11011&amp;oldid=prev</id>
		<title>Kangkk：​创建页面，内容为“== 引言 == {{hc|mediawiki.conf|&lt;syntaxhighlight lang=&quot;lighttpd&quot;&gt; &lt;VirtualHost *:80&gt;     DocumentRoot &quot;/var/www/html/mediawiki/&quot;     ServerName kangkk.cn      RewriteEngine on     RewriteCond %{SERVER_PORT} !^443$     RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [L,R]  #    ProxyPreserveHost On #    ProxyPass /kangkk.cn/ http://kangkk.cn:7231/kangkk.cn/ #    ProxyPassReverse /kangkk.cn/ http://kangkk.cn:7231/kangkk.cn/      # Alternate configuration like WMF to…”</title>
		<link rel="alternate" type="text/html" href="https://kangwuyi.com/index.php?title=%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95/%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85%E4%B8%8E%E5%8D%87%E7%BA%A7/Apache2%E9%85%8D%E7%BD%AE&amp;diff=11011&amp;oldid=prev"/>
		<updated>2026-09-07T06:59:43Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“== 引言 == {{hc|mediawiki.conf|&amp;lt;syntaxhighlight lang=&amp;quot;lighttpd&amp;quot;&amp;gt; &amp;lt;VirtualHost *:80&amp;gt;     DocumentRoot &amp;quot;/var/www/html/mediawiki/&amp;quot;     ServerName kangkk.cn      RewriteEngine on     RewriteCond %{SERVER_PORT} !^443$     RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [L,R]  #    ProxyPreserveHost On #    ProxyPass /kangkk.cn/ http://kangkk.cn:7231/kangkk.cn/ #    ProxyPassReverse /kangkk.cn/ http://kangkk.cn:7231/kangkk.cn/      # Alternate configuration like WMF to…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== 引言 ==&lt;br /&gt;
{{hc|mediawiki.conf|&amp;lt;syntaxhighlight lang=&amp;quot;lighttpd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;
    DocumentRoot &amp;quot;/var/www/html/mediawiki/&amp;quot;&lt;br /&gt;
    ServerName kangkk.cn&lt;br /&gt;
&lt;br /&gt;
    RewriteEngine on&lt;br /&gt;
    RewriteCond %{SERVER_PORT} !^443$&lt;br /&gt;
    RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [L,R]&lt;br /&gt;
&lt;br /&gt;
#    ProxyPreserveHost On&lt;br /&gt;
#    ProxyPass /kangkk.cn/ http://kangkk.cn:7231/kangkk.cn/&lt;br /&gt;
#    ProxyPassReverse /kangkk.cn/ http://kangkk.cn:7231/kangkk.cn/&lt;br /&gt;
&lt;br /&gt;
    # Alternate configuration like WMF to have URLS like //example.com/api/rest_v1/&lt;br /&gt;
#    ProxyPass /api/rest_v1/ http://kangkk.cn:7231/kangkk.cn/v1/&lt;br /&gt;
#    ProxyPassReverse /api/rest_v1/ http://kangkk.cn:7231/kangkk.cn/v1/&lt;br /&gt;
&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/html/mediawiki/&amp;quot;&amp;gt;&lt;br /&gt;
    AllowOverride All&lt;br /&gt;
    Require all granted&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{hc|mediawiki-ssl.conf|&amp;lt;syntaxhighlight lang=&amp;quot;lighttpd&amp;quot;&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# When we also provide SSL we have to listen to the&lt;br /&gt;
# the HTTPS port in addition.&lt;br /&gt;
#&lt;br /&gt;
Listen 443 https&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
##  SSL Global Context&lt;br /&gt;
##&lt;br /&gt;
##  All SSL configuration in this context applies both to&lt;br /&gt;
##  the main server and all SSL-enabled virtual hosts.&lt;br /&gt;
##&lt;br /&gt;
&lt;br /&gt;
#   Pass Phrase Dialog:&lt;br /&gt;
#   Configure the pass phrase gathering process.&lt;br /&gt;
#   The filtering dialog program (`builtin&amp;#039; is a internal&lt;br /&gt;
#   terminal dialog) has to provide the pass phrase on stdout.&lt;br /&gt;
SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog&lt;br /&gt;
&lt;br /&gt;
#   Inter-Process Session Cache:&lt;br /&gt;
#   Configure the SSL Session Cache: First the mechanism&lt;br /&gt;
#   to use and second the expiring timeout (in seconds).&lt;br /&gt;
SSLSessionCache         shmcb:/run/httpd/sslcache(512000)&lt;br /&gt;
SSLSessionCacheTimeout  300&lt;br /&gt;
&lt;br /&gt;
#   Pseudo Random Number Generator (PRNG):&lt;br /&gt;
#   Configure one or more sources to seed the PRNG of the&lt;br /&gt;
#   SSL library. The seed data should be of good random quality.&lt;br /&gt;
#   WARNING! On some platforms /dev/random blocks if not enough entropy&lt;br /&gt;
#   is available. This means you then cannot use the /dev/random device&lt;br /&gt;
#   because it would lead to very long connection times (as long as&lt;br /&gt;
#   it requires to make more entropy available). But usually those&lt;br /&gt;
#   platforms additionally provide a /dev/urandom device which doesn&amp;#039;t&lt;br /&gt;
#   block. So, if available, use this one instead. Read the mod_ssl User&lt;br /&gt;
#   Manual for more details.&lt;br /&gt;
SSLRandomSeed startup file:/dev/urandom  256&lt;br /&gt;
SSLRandomSeed connect builtin&lt;br /&gt;
#SSLRandomSeed startup file:/dev/random  512&lt;br /&gt;
#SSLRandomSeed connect file:/dev/random  512&lt;br /&gt;
#SSLRandomSeed connect file:/dev/urandom 512&lt;br /&gt;
&lt;br /&gt;
#&lt;br /&gt;
# Use &amp;quot;SSLCryptoDevice&amp;quot; to enable any supported hardware&lt;br /&gt;
# accelerators. Use &amp;quot;openssl engine -v&amp;quot; to list supported&lt;br /&gt;
# engine names.  NOTE: If you enable an accelerator and the&lt;br /&gt;
# server does not start, consult the error logs and ensure&lt;br /&gt;
# your accelerator is functioning properly.&lt;br /&gt;
#&lt;br /&gt;
SSLCryptoDevice builtin&lt;br /&gt;
#SSLCryptoDevice ubsec&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## SSL Virtual Host Context&lt;br /&gt;
##&lt;br /&gt;
&lt;br /&gt;
&amp;lt;VirtualHost _default_:443&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# General setup for the virtual host, inherited from global configuration&lt;br /&gt;
DocumentRoot &amp;quot;/var/www/html/mediawiki/&amp;quot;&lt;br /&gt;
ServerName www.kangkk.cn:443&lt;br /&gt;
&lt;br /&gt;
# Use separate log files for the SSL virtual host; note that LogLevel&lt;br /&gt;
# is not inherited from httpd.conf.&lt;br /&gt;
ErrorLog logs/ssl_error_log&lt;br /&gt;
TransferLog logs/ssl_access_log&lt;br /&gt;
LogLevel warn&lt;br /&gt;
&lt;br /&gt;
#   SSL Engine Switch:&lt;br /&gt;
#   Enable/Disable SSL for this virtual host.&lt;br /&gt;
SSLEngine on&lt;br /&gt;
&lt;br /&gt;
#   SSL Protocol support:&lt;br /&gt;
# List the enable protocol levels with which clients will be able to&lt;br /&gt;
# connect.  Disable SSLv2 access by default:&lt;br /&gt;
SSLProtocol all -SSLv2 -SSLv3&lt;br /&gt;
&lt;br /&gt;
#   SSL Cipher Suite:&lt;br /&gt;
#   List the ciphers that the client is permitted to negotiate.&lt;br /&gt;
#   See the mod_ssl documentation for a complete list.&lt;br /&gt;
#SSLCipherSuite HIGH:3DES:!aNULL:!MD5:!SEED:!IDEA&lt;br /&gt;
SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#   Speed-optimized SSL Cipher configuration:&lt;br /&gt;
#   If speed is your main concern (on busy HTTPS servers e.g.),&lt;br /&gt;
#   you might want to force clients to specific, performance&lt;br /&gt;
#   optimized ciphers. In this case, prepend those ciphers&lt;br /&gt;
#   to the SSLCipherSuite list, and enable SSLHonorCipherOrder.&lt;br /&gt;
#   Caveat: by giving precedence to RC4-SHA and AES128-SHA&lt;br /&gt;
#   (as in the example below), most connections will no longer&lt;br /&gt;
#   have perfect forward secrecy - if the server&amp;#039;s key is&lt;br /&gt;
#   compromised, captures of past or future traffic must be&lt;br /&gt;
#   considered compromised, too.&lt;br /&gt;
#SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5&lt;br /&gt;
SSLHonorCipherOrder on&lt;br /&gt;
&lt;br /&gt;
#   Server Certificate:&lt;br /&gt;
# Point SSLCertificateFile at a PEM encoded certificate.  If&lt;br /&gt;
# the certificate is encrypted, then you will be prompted for a&lt;br /&gt;
# pass phrase.  Note that a kill -HUP will prompt again.  A new&lt;br /&gt;
# certificate can be generated using the genkey(1) command.&lt;br /&gt;
SSLCertificateFile /etc/httpd/certs/_kangkk.cn_public.crt&lt;br /&gt;
&lt;br /&gt;
#   Server Private Key:&lt;br /&gt;
#   If the key is not combined with the certificate, use this&lt;br /&gt;
#   directive to point at the key file.  Keep in mind that if&lt;br /&gt;
#   you&amp;#039;ve both a RSA and a DSA private key you can configure&lt;br /&gt;
#   both in parallel (to also allow the use of DSA ciphers, etc.)&lt;br /&gt;
SSLCertificateKeyFile /etc/httpd/certs/_kangkk.cn.key&lt;br /&gt;
&lt;br /&gt;
#   Server Certificate Chain:&lt;br /&gt;
#   Point SSLCertificateChainFile at a file containing the&lt;br /&gt;
#   concatenation of PEM encoded CA certificates which form the&lt;br /&gt;
#   certificate chain for the server certificate. Alternatively&lt;br /&gt;
#   the referenced file can be the same as SSLCertificateFile&lt;br /&gt;
#   when the CA certificates are directly appended to the server&lt;br /&gt;
#   certificate for convinience.&lt;br /&gt;
SSLCertificateChainFile /etc/httpd/certs/_kangkk.cn_chain.crt&lt;br /&gt;
&lt;br /&gt;
#   Certificate Authority (CA):&lt;br /&gt;
#   Set the CA certificate verification path where to find CA&lt;br /&gt;
#   certificates for client authentication or alternatively one&lt;br /&gt;
#   huge file containing all of them (file must be PEM encoded)&lt;br /&gt;
#SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt&lt;br /&gt;
&lt;br /&gt;
#   Client Authentication (Type):&lt;br /&gt;
#   Client certificate verification type and depth.  Types are&lt;br /&gt;
#   none, optional, require and optional_no_ca.  Depth is a&lt;br /&gt;
#   number which specifies how deeply to verify the certificate&lt;br /&gt;
#   issuer chain before deciding the certificate is not valid.&lt;br /&gt;
#SSLVerifyClient require&lt;br /&gt;
#SSLVerifyDepth  10&lt;br /&gt;
&lt;br /&gt;
#   Access Control:&lt;br /&gt;
#   With SSLRequire you can do per-directory access control based&lt;br /&gt;
#   on arbitrary complex boolean expressions containing server&lt;br /&gt;
#   variable checks and other lookup directives.  The syntax is a&lt;br /&gt;
#   mixture between C and Perl.  See the mod_ssl documentation&lt;br /&gt;
#   for more details.&lt;br /&gt;
#&amp;lt;Location /&amp;gt;&lt;br /&gt;
#SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \&lt;br /&gt;
#            and %{SSL_CLIENT_S_DN_O} eq &amp;quot;Snake Oil, Ltd.&amp;quot; \&lt;br /&gt;
#            and %{SSL_CLIENT_S_DN_OU} in {&amp;quot;Staff&amp;quot;, &amp;quot;CA&amp;quot;, &amp;quot;Dev&amp;quot;} \&lt;br /&gt;
#            and %{TIME_WDAY} &amp;gt;= 1 and %{TIME_WDAY} &amp;lt;= 5 \&lt;br /&gt;
#            and %{TIME_HOUR} &amp;gt;= 8 and %{TIME_HOUR} &amp;lt;= 20       ) \&lt;br /&gt;
#           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/&lt;br /&gt;
#&amp;lt;/Location&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#   SSL Engine Options:&lt;br /&gt;
#   Set various options for the SSL engine.&lt;br /&gt;
#   o FakeBasicAuth:&lt;br /&gt;
#     Translate the client X.509 into a Basic Authorisation.  This means that&lt;br /&gt;
#     the standard Auth/DBMAuth methods can be used for access control.  The&lt;br /&gt;
#     user name is the `one line&amp;#039; version of the client&amp;#039;s X.509 certificate.&lt;br /&gt;
#     Note that no password is obtained from the user. Every entry in the user&lt;br /&gt;
#     file needs this password: `xxj31ZMTZzkVA&amp;#039;.&lt;br /&gt;
#   o ExportCertData:&lt;br /&gt;
#     This exports two additional environment variables: SSL_CLIENT_CERT and&lt;br /&gt;
#     SSL_SERVER_CERT. These contain the PEM-encoded certificates of the&lt;br /&gt;
#     server (always existing) and the client (only existing when client&lt;br /&gt;
#     authentication is used). This can be used to import the certificates&lt;br /&gt;
#     into CGI scripts.&lt;br /&gt;
#   o StdEnvVars:&lt;br /&gt;
#     This exports the standard SSL/TLS related `SSL_*&amp;#039; environment variables.&lt;br /&gt;
#     Per default this exportation is switched off for performance reasons,&lt;br /&gt;
#     because the extraction step is an expensive operation and is usually&lt;br /&gt;
#     useless for serving static content. So one usually enables the&lt;br /&gt;
#     exportation for CGI and SSI requests only.&lt;br /&gt;
#   o StrictRequire:&lt;br /&gt;
#     This denies access when &amp;quot;SSLRequireSSL&amp;quot; or &amp;quot;SSLRequire&amp;quot; applied even&lt;br /&gt;
#     under a &amp;quot;Satisfy any&amp;quot; situation, i.e. when it applies access is denied&lt;br /&gt;
#     and no other module can change it.&lt;br /&gt;
#   o OptRenegotiate:&lt;br /&gt;
#     This enables optimized SSL connection renegotiation handling when SSL&lt;br /&gt;
#     directives are used in per-directory context.&lt;br /&gt;
#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire&lt;br /&gt;
&amp;lt;Files ~ &amp;quot;\.(cgi|shtml|phtml|php3?)$&amp;quot;&amp;gt;&lt;br /&gt;
    SSLOptions +StdEnvVars&lt;br /&gt;
&amp;lt;/Files&amp;gt;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/cgi-bin&amp;quot;&amp;gt;&lt;br /&gt;
    SSLOptions +StdEnvVars&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#   SSL Protocol Adjustments:&lt;br /&gt;
#   The safe and default but still SSL/TLS standard compliant shutdown&lt;br /&gt;
#   approach is that mod_ssl sends the close notify alert but doesn&amp;#039;t wait for&lt;br /&gt;
#   the close notify alert from client. When you need a different shutdown&lt;br /&gt;
#   approach you can use one of the following variables:&lt;br /&gt;
#   o ssl-unclean-shutdown:&lt;br /&gt;
#     This forces an unclean shutdown when the connection is closed, i.e. no&lt;br /&gt;
#     SSL close notify alert is send or allowed to received.  This violates&lt;br /&gt;
#     the SSL/TLS standard but is needed for some brain-dead browsers. Use&lt;br /&gt;
#     this when you receive I/O errors because of the standard approach where&lt;br /&gt;
#     mod_ssl sends the close notify alert.&lt;br /&gt;
#   o ssl-accurate-shutdown:&lt;br /&gt;
#     This forces an accurate shutdown when the connection is closed, i.e. a&lt;br /&gt;
#     SSL close notify alert is send and mod_ssl waits for the close notify&lt;br /&gt;
#     alert of the client. This is 100% SSL/TLS standard compliant, but in&lt;br /&gt;
#     practice often causes hanging connections with brain-dead browsers. Use&lt;br /&gt;
#     this only for browsers where you know that their SSL implementation&lt;br /&gt;
#     works correctly.&lt;br /&gt;
#   Notice: Most problems of broken clients are also related to the HTTP&lt;br /&gt;
#   keep-alive facility, so you usually additionally want to disable&lt;br /&gt;
#   keep-alive for those clients, too. Use variable &amp;quot;nokeepalive&amp;quot; for this.&lt;br /&gt;
#   Similarly, one has to force some clients to use HTTP/1.0 to workaround&lt;br /&gt;
#   their broken HTTP/1.1 implementation. Use variables &amp;quot;downgrade-1.0&amp;quot; and&lt;br /&gt;
#   &amp;quot;force-response-1.0&amp;quot; for this.&lt;br /&gt;
BrowserMatch &amp;quot;MSIE [2-5]&amp;quot; \&lt;br /&gt;
         nokeepalive ssl-unclean-shutdown \&lt;br /&gt;
         downgrade-1.0 force-response-1.0&lt;br /&gt;
&lt;br /&gt;
#   Per-Server Logging:&lt;br /&gt;
#   The home of a custom SSL log file. Use this when you want a&lt;br /&gt;
#   compact non-error SSL logfile on a virtual host basis.&lt;br /&gt;
CustomLog logs/ssl_request_log \&lt;br /&gt;
          &amp;quot;%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \&amp;quot;%r\&amp;quot; %b&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    AllowEncodedSlashes NoDecode&lt;br /&gt;
&lt;br /&gt;
    ProxyPreserveHost On&lt;br /&gt;
    # ProxyPass /api/rest_v1/ http://kangkk.cn:7231/kangkk.cn/v1/ nocanon&lt;br /&gt;
    # ProxyPassReverse /api/rest_v1/ http://kangkk.cn:7231/kangkk.cn/v1/&lt;br /&gt;
    ProxyPass /api/rest_v1/ http://localhost:7231/kangkk.cn/v1/ nocanon&lt;br /&gt;
    ProxyPassReverse /api/rest_v1/ http://localhost:7231/kangkk.cn/v1/&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;VirtualHost *:443&amp;gt;&lt;br /&gt;
    ServerName dia.kangkk.cn&lt;br /&gt;
&lt;br /&gt;
    SSLEngine on&lt;br /&gt;
    SSLCertificateFile /etc/httpd/certs/_dia.kangkk.cn_public.crt&lt;br /&gt;
    SSLCertificateKeyFile /etc/httpd/certs/_dia.kangkk.cn.key&lt;br /&gt;
    SSLCertificateChainFile /etc/httpd/certs/_dia.kangkk.cn_chain.crt&lt;br /&gt;
    SSLHonorCipherOrder on&lt;br /&gt;
&lt;br /&gt;
    ProxyPass /render http://localhost:5003/render&lt;br /&gt;
    ProxyPassReverse /render http://localhost:5003/render&lt;br /&gt;
&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;/div&gt;</summary>
		<author><name>Kangkk</name></author>
	</entry>
</feed>