{"id":34674,"date":"2023-01-27T01:11:34","date_gmt":"2022-11-13T06:40:31","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%ae%89%e8%a3%85apache-httpd-2-4-43http-2brotli%e5%88%b0sakura-vps%e7%9a%84centos8%e7%8e%af%e5%a2%83%e3%80%82\/"},"modified":"2024-04-29T11:39:11","modified_gmt":"2024-04-29T03:39:11","slug":"%e5%b0%9d%e8%af%95%e5%ae%89%e8%a3%85apache-httpd-2-4-43http-2brotli%e5%88%b0sakura-vps%e7%9a%84centos8%e7%8e%af%e5%a2%83%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%ae%89%e8%a3%85apache-httpd-2-4-43http-2brotli%e5%88%b0sakura-vps%e7%9a%84centos8%e7%8e%af%e5%a2%83%e3%80%82\/","title":{"rendered":"\u5c1d\u8bd5\u5b89\u88c5Apache httpd 2.4.43+HTTP\/2+Brotli\u5230Sakura VPS\u7684CentOS8\u73af\u5883"},"content":{"rendered":"<h1>\u6cea\u6c34\u7684sshd<\/h1>\n<p>\u6211\u5728Sakura VPS\u4e0a\u8fdb\u884c\u4e86CentOS 8\u7684\u5b9a\u5236\u5b89\u88c5\u3002<\/p>\n<p>\u6765\u5427\uff0c\u5f53\u6211\u5c1d\u8bd5\u5b89\u88c5Apache2.4.23+openssl1.1.1g\u65f6&#8230;<br \/>\n\u6bcf\u4e00\u6b21\uff0csshd\u90fd\u4f1a\u7a81\u7136\u5d29\u6e83\u3002<\/p>\n<p>\u7ecf\u5386\u4e86\u66f2\u6298\u7684\u8fc7\u7a0b\u540e\uff0c\u6211\u53c2\u8003\u4e86\u51e0\u4e2a\u7f51\u7ad9\uff0c\u52c9\u5f3a\u627e\u5230\u4e86\u89e3\u51b3\u65b9\u6cd5\uff0c\u4e3a\u4e86\u5907\u5fd8\u8bb0\u5f55\u4e0b\u6765\u3002\u7279\u522b\u662f\u53c2\u8003\u4e86\u4e0b\u9762\u5217\u51fa\u7684\u7f51\u7ad9\uff0c\u51e0\u4e4e\u5b8c\u5168\u6309\u7167\u963f\u5e15\u5e03\u767b\u5f55\u7684\u65b9\u5f0f\u8fdb\u884c\u64cd\u4f5c\u3002\u4e0d\u8fc7\uff0c\u7531\u4e8e\u963f\u5e15\u5e03\u535a\u5ba2\u7684\u65b9\u6cd5\u5728\u5b89\u88c5openssl\u65f6\u9047\u5230\u4e86\u95ee\u9898\uff0c\u6240\u4ee5\u6211\u8fdb\u884c\u4e86\u4fee\u6539\u3002<\/p>\n<h1>\u5b89\u88c5openssl 1.1.1g\u3002<\/h1>\n<pre class=\"post-pre\"><code># dnf install -y zlib-devel perl-core jansson-devel libev-devel c-ares-devel cmake pcre-devel expat-devel lksctp-tools lksctp-tools-devel \r\n# cd \/usr\/local\/src\r\n# wget https:\/\/www.openssl.org\/source\/openssl-1.1.1g.tar.gz\r\n# tar xvzf openssl-1.1.1g.tar.gz\r\n# rm -f openssl-1.1.1g.tar.gz\r\n# cd openssl-1.1.1g\r\n# .\/config --prefix=\/usr\/local shared zlib\r\n# make\r\n# make test\r\n# make install\r\n# ldconfig -v\r\n<\/code><\/pre>\n<p>\u5728\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f7f\u7528\/usr\/local\/bin\/openssl version -a\u6267\u884c<\/p>\n<pre class=\"post-pre\"><code>OpenSSL 1.1.1g  21 Apr 2020 (Library: OpenSSL 1.1.1c FIPS  28 May 2019)\r\nbuilt on: Thu Apr  9 19:02:31 2020 UTC\r\nplatform: linux-x86_64\r\noptions:  bn(64,64) rc4(16x,int) des(int) idea(int) blowfish(ptr) \r\ncompiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=\/usr\/lib\/rpm\/redhat\/redhat-hardened-cc1 -specs=\/usr\/lib\/rpm\/redhat\/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wa,--noexecstack -Wa,--generate-missing-build-notes=yes -specs=\/usr\/lib\/rpm\/redhat\/redhat-hardened-ld -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DZLIB -DNDEBUG -DPURIFY -DDEVRANDOM=\"\\\"\/dev\/urandom\\\"\" -DSYSTEM_CIPHERS_FILE=\"\/etc\/crypto-policies\/back-ends\/openssl.config\"\r\nOPENSSLDIR: \"\/etc\/pki\/tls\"\r\nENGINESDIR: \"\/usr\/lib64\/engines-1.1\"\r\nSeeding source: os-specific\r\n<\/code><\/pre>\n<p>\u4ed6\uff08\u5979\uff09\u8d70\u51fa\u6765\u4e86\u3002<\/p>\n<p>\u6211\u6ca1\u6709\u521b\u5efa\/etc\/ld.so.conf.d\/\u3002<\/p>\n<h1>\u5b89\u88c5Nghttp2<\/h1>\n<pre class=\"post-pre\"><code># cd \/usr\/local\/src\/\r\n# wget https:\/\/github.com\/nghttp2\/nghttp2\/releases\/download\/v1.40.0\/nghttp2-1.40.0.tar.gz\r\n# tar xvzf nghttp2-1.40.0.tar.gz\r\n# rm -f nghttp2-1.40.0.tar.gz\r\n# cd nghttp2-1.40.0\/\r\n# env OPENSSL_CFLAGS=\"-I\/usr\/local\/include\" OPENSSL_LIBS=\"-L\/usr\/local\/lib -lssl -lcrypto\" .\/configure -enable-app\r\n# make\r\n# make install\r\n<\/code><\/pre>\n<h1>\u5b89\u88c5Brotli<\/h1>\n<pre class=\"post-pre\"><code># cd \/usr\/local\/src\/\r\n# wget https:\/\/github.com\/google\/brotli\/archive\/v1.0.7.tar.gz\r\n# tar xvzf v1.0.7.tar.gz\r\n# rm -f v1.0.7.tar.gz\r\n# cd brotli-1.0.7\/\r\n# mkdir out &amp;&amp; cd out\r\n# ..\/configure-cmake\r\n# make\r\n# make test\r\n# make install\r\n<\/code><\/pre>\n<h1>\u4e2d\u95f4\u7684\u6574\u7406\u5de5\u4f5c\u5b8c\u6210<\/h1>\n<pre class=\"post-pre\"><code>echo \/usr\/local\/lib &gt; \/etc\/ld.so.conf.d\/usr-local-lib.conf\r\nldconfig\r\n<\/code><\/pre>\n<h1>\u5b89\u88c5apache<\/h1>\n<h2>\u8bf7\u5148\u8bbe\u7f6e\u9632\u706b\u5899\u3002<\/h2>\n<pre class=\"post-pre\"><code># firewall-cmd --permanent --add-service=http --zone=public\r\n# firewall-cmd --permanent --add-service=https --zone=public\r\n# firewall-cmd --reload\r\n\r\n<\/code><\/pre>\n<h2>\u5b89\u88c5APR<\/h2>\n<pre class=\"post-pre\"><code># cd \/usr\/local\/src\r\n# wget https:\/\/downloads.apache.org\/\/apr\/apr-1.7.0.tar.gz\r\n# tar fxz apr-1.7.0.tar.gz\r\n# rm -f apr-1.7.0.tar.gz\r\n# cd apr-1.7.0\r\n# .\/configure --prefix=\/usr\/local\/\r\n# make\r\n# make install\r\n<\/code><\/pre>\n<p>\u987a\u5229\u8fdb\u884c\u4e86\u3002<\/p>\n<h2>\u5b89\u88c5APR-Util<\/h2>\n<pre class=\"post-pre\"><code># cd \/usr\/local\/src\r\n# wget https:\/\/downloads.apache.org\/\/apr\/apr-util-1.6.1.tar.gz\r\n# tar fxz apr-util-1.6.1.tar.gz\r\n# rm -f apr-util-1.6.1.tar.gz\r\n# cd apr-util-1.6.1\r\n# .\/configure --prefix=\/usr\/local\/ --with-apr=\/usr\/local\/\r\n# make\r\n# make install\r\n<\/code><\/pre>\n<h2>\u7ec8\u4e8e\u5230\u4e86\u672c\u4e38\u7684\u65f6\u5019\u4e86\u3002<\/h2>\n<p>\u521b\u5efaApache\u7528\u6237<\/p>\n<pre class=\"post-pre\"><code># groupadd apache\r\n# useradd -g apache apache\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code># cd \/usr\/local\/src\/\r\n# wget http:\/\/ftp.jaist.ac.jp\/pub\/apache\/\/httpd\/httpd-2.4.43.tar.gz\r\n# tar xvzf httpd-2.4.43.tar.gz\r\n# cd httpd-2.4.43\/\r\n.\/configure \\\r\n--enable-layout=RedHat \\\r\n--enable-http2 \\\r\n--enable-brotli \\\r\n--with-brotli=\/usr\/local\/lib \\\r\n--enable-ssl \\\r\n--with-ssl=\/usr\/local\/ \\\r\n--with-apr=\/usr\/local\/ \\\r\n--with-apr-util=\/usr\/local\/ \\\r\n--enable-so \\\r\n--enable-mods-shared=all \\\r\n--enable-mpms-shared=all\r\n# make\r\n# make install\r\n<\/code><\/pre>\n<p>\u53ea\u9700\u8981\u4e00\u4e2a\u9009\u9879\uff1a\u300c\u554a\u556a\u5e03\u7f57\u683c\uff08Apa Blog\uff09\u548c\u8d2d\u4e70\u7684\u662fenable-layout=RedHat\u7684\u90e8\u5206\u3002\u5982\u679c\u6ca1\u6709\u8fd9\u4e2a\u9009\u9879\uff0c\u5b83\u5c06\u88ab\u5b89\u88c5\u5728\/usr\/local\/apache2\u4e0a\uff0c\u4f46\u662f\u5982\u679c\u5b89\u88c5\u4e86\u8fd9\u4e2a\u9009\u9879\uff0c\u5b83\u5c06\u88ab\u5b89\u88c5\u5728\/usr\u76f4\u63a5\u76ee\u5f55\u4e0b\u3002\u6b64\u5916\uff0c\u300d<\/p>\n<pre class=\"post-pre\"><code>    prefix:        \/usr\r\n    exec_prefix:   ${prefix}\r\n    bindir:        ${prefix}\/bin\r\n    sbindir:       ${prefix}\/sbin\r\n    libdir:        ${prefix}\/lib\r\n    libexecdir:    ${prefix}\/lib\/apache\r\n    mandir:        ${prefix}\/man\r\n    sysconfdir:    \/etc\/httpd\/conf\r\n    datadir:       \/var\/www\r\n    installbuilddir: ${datadir}\/build\r\n    errordir:      ${datadir}\/error\r\n    iconsdir:      ${datadir}\/icons\r\n    htdocsdir:     ${datadir}\/html\r\n    manualdir:     ${datadir}\/manual\r\n    cgidir:        ${datadir}\/cgi-bin\r\n    includedir:    ${prefix}\/include\/apache\r\n    localstatedir: \/var\r\n    runtimedir:    ${localstatedir}\/run\r\n    logfiledir:    ${localstatedir}\/log\/httpd\r\n    proxycachedir: ${localstatedir}\/cache\/httpd\r\n<\/code><\/pre>\n<p>\u56e0\u6b64\uff0c\u6211\u8ba4\u4e3a\u53ef\u4ee5\u4e0e\u5176\u4ed6\u89e3\u91ca\u6027\u535a\u5ba2\u7b49\u8fdb\u884c\u5e73\u4ec4\u7684\u534f\u8c03\u3002<\/p>\n<h1>Apache httpd\u7b49\u7684\u914d\u7f6e<\/h1>\n<p>\u5c06httpd.conf\u548chttpd-ssl.conf\u6587\u4ef6\u8fdb\u884c\u5907\u4efd\u3002\u5728\u6211\u7684\u73af\u5883\u4e2d\uff0c\u5b83\u5728\u591a\u57df\u73af\u5883\u4e0b\u8fd0\u884c\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\/var\/www\/html<\/ul>\n<\/li>\n<\/ul>\n<p>\/hogehogeA<br \/>\n\/hogehogeB<\/p>\n<p>\u4e3a\u4e86\u8fd9\u4e2a\u76ee\u7684\uff0c\u6211\u8fdb\u884c\u4e86\u4e00\u4e9b\u7ed3\u6784\u4e0a\u7684\u66f4\u6539\u3002\u56e0\u6b64\uff0c\u6211\u8fd8\u7f16\u8f91\u4e86httpd-vhosts.conf\u6587\u4ef6\u3002<br \/>\n\u503c\u5f97\u4e00\u63d0\u7684\u662f\uff0c\u7531\u4e8eHTTP\/2\u548cBrotli\u662f\u5fc5\u987b\u4f7f\u7528HTTPS\u7684\uff0c\u6240\u4ee5\u6211\u5148\u4f7f\u7528Let&#8217;s Encrypt\u51c6\u5907\u4e86\u8bc1\u4e66\u3002\u5173\u4e8e\u8bc1\u4e66\u51c6\u5907\u7684\u7ec6\u8282\u6211\u5c31\u4e0d\u518d\u8d58\u8ff0\u4e86\u3002<\/p>\n<pre class=\"post-pre\"><code># cd \/var\/www\/html\r\n# mkdir hogehogeA\r\n# mkdir hogehogeB\r\n# chmod 755 \/var\/www\/\r\n# chmod 755 \/var\/www\/html\r\n# chmod 755 \/var\/www\/html\/hogehogeA\r\n# chmod 755 \/var\/www\/html\/hogehogeB\r\n# chown -R apache:apache \/var\/www\/\r\n<\/code><\/pre>\n<h2>\u5907\u4efd<\/h2>\n<pre class=\"post-pre\"><code># cd \/etc\/httpd\/conf\/\r\n# cp httpd.conf httpd.conf.org\r\n# cp extra\/httpd-ssl.conf extra\/httpd-ssl.conf.org\r\n# cp extra\/httpd-vhosts.conf extra\/httpd-ssl.vhost.org\r\n<\/code><\/pre>\n<h2>httpd.conf\u914d\u7f6e\u6587\u4ef6\u7684\u8bbe\u7f6e<\/h2>\n<p>\u6211\u6b63\u5728\u66f4\u6539\u8bbe\u7f6e\u6587\u4ef6\u3002\u9996\u5148\u662f\u4ecehttpd.conf\u5f00\u59cb\uff0c\u5c06\u9ed8\u8ba4\u7684\u7528\u6237\u548c\u7ec4\u4ecedaemon\u66f4\u6539\u4e3aapache\u3002<br \/>\n\u7136\u540e\uff0c\u6211\u6b63\u5728\u4fee\u6539&lt;Directory &#8220;var\/www\/html&#8221;&gt;\u4e2d\u7684\u5185\u5bb9\u3002<\/p>\n<pre class=\"post-pre\"><code># nano \/etc\/httpd\/conf\/httpd.conf\r\n--------------------\r\nServerTokens Prod\r\nServerSignature Off\r\nTraceEnable Off\r\nAddDefaultCharset UTF-8\r\nHeader set X-XSS-Protection \"1; mode=block\"\r\nHeader always append X-Content-Type-Options nosniff\r\n\r\nHostnameLookups Off\r\nServerRoot \"\/usr\"\r\n\r\nListen 80\r\nUser apache\r\nGroup apache\r\nServerAdmin root@localhost\r\nServerName localhost:80\r\n\r\n#\r\n# Dynamic Shared Object (DSO) Support\r\n#\r\n# To be able to use the functionality of a module which was built as a DSO you\r\n# have to place corresponding `LoadModule' lines at this location so the\r\n# directives contained in it are actually available _before_ they are used.\r\n# Statically compiled modules (those listed by `httpd -l') do not need\r\n# to be loaded here.\r\n#\r\n# Example: LoadModule foo_module modules\/mod_foo.so\r\nLoadModule mpm_event_module lib\/apache\/mod_mpm_event.so\r\n#LoadModule mpm_prefork_module lib\/apache\/mod_mpm_prefork.so\r\n#LoadModule mpm_worker_module lib\/apache\/mod_mpm_worker.so\r\nLoadModule authn_file_module lib\/apache\/mod_authn_file.so\r\n#LoadModule authn_dbm_module lib\/apache\/mod_authn_dbm.so\r\n#LoadModule authn_anon_module lib\/apache\/mod_authn_anon.so\r\n#LoadModule authn_dbd_module lib\/apache\/mod_authn_dbd.so\r\n#LoadModule authn_socache_module lib\/apache\/mod_authn_socache.so\r\nLoadModule authn_core_module lib\/apache\/mod_authn_core.so\r\nLoadModule authz_host_module lib\/apache\/mod_authz_host.so\r\nLoadModule authz_groupfile_module lib\/apache\/mod_authz_groupfile.so\r\nLoadModule authz_user_module lib\/apache\/mod_authz_user.so\r\n#LoadModule authz_dbm_module lib\/apache\/mod_authz_dbm.so\r\n#LoadModule authz_owner_module lib\/apache\/mod_authz_owner.so\r\n#LoadModule authz_dbd_module lib\/apache\/mod_authz_dbd.so\r\nLoadModule authz_core_module lib\/apache\/mod_authz_core.so\r\nLoadModule access_compat_module lib\/apache\/mod_access_compat.so\r\nLoadModule auth_basic_module lib\/apache\/mod_auth_basic.so\r\n#LoadModule auth_form_module lib\/apache\/mod_auth_form.so\r\n#LoadModule auth_digest_module lib\/apache\/mod_auth_digest.so\r\n#LoadModule allowmethods_module lib\/apache\/mod_allowmethods.so\r\n#LoadModule file_cache_module lib\/apache\/mod_file_cache.so\r\n#LoadModule cache_module lib\/apache\/mod_cache.so\r\n#LoadModule cache_disk_module lib\/apache\/mod_cache_disk.so\r\n#LoadModule cache_socache_module lib\/apache\/mod_cache_socache.so\r\nLoadModule socache_shmcb_module lib\/apache\/mod_socache_shmcb.so\r\n#LoadModule socache_dbm_module lib\/apache\/mod_socache_dbm.so\r\n#LoadModule socache_memcache_module lib\/apache\/mod_socache_memcache.so\r\n#LoadModule socache_redis_module lib\/apache\/mod_socache_redis.so\r\nLoadModule watchdog_module lib\/apache\/mod_watchdog.so\r\n#LoadModule macro_module lib\/apache\/mod_macro.so\r\n#LoadModule dbd_module lib\/apache\/mod_dbd.so\r\n#LoadModule dumpio_module lib\/apache\/mod_dumpio.so\r\n#LoadModule echo_module lib\/apache\/mod_echo.so\r\n#LoadModule buffer_module lib\/apache\/mod_buffer.so\r\n#LoadModule data_module lib\/apache\/mod_data.so\r\n#LoadModule ratelimit_module lib\/apache\/mod_ratelimit.so\r\nLoadModule reqtimeout_module lib\/apache\/mod_reqtimeout.so\r\n#LoadModule ext_filter_module lib\/apache\/mod_ext_filter.so\r\n#LoadModule request_module lib\/apache\/mod_request.so\r\n#LoadModule include_module lib\/apache\/mod_include.so\r\nLoadModule filter_module lib\/apache\/mod_filter.so\r\n#LoadModule reflector_module lib\/apache\/mod_reflector.so\r\n#LoadModule substitute_module lib\/apache\/mod_substitute.so\r\n#LoadModule sed_module lib\/apache\/mod_sed.so\r\n#LoadModule charset_lite_module lib\/apache\/mod_charset_lite.so\r\nLoadModule deflate_module lib\/apache\/mod_deflate.so\r\nLoadModule brotli_module lib\/apache\/mod_brotli.so\r\nLoadModule mime_module lib\/apache\/mod_mime.so\r\nLoadModule log_config_module lib\/apache\/mod_log_config.so\r\n#LoadModule log_debug_module lib\/apache\/mod_log_debug.so\r\n#LoadModule log_forensic_module lib\/apache\/mod_log_forensic.so\r\n#LoadModule logio_module lib\/apache\/mod_logio.so\r\nLoadModule env_module lib\/apache\/mod_env.so\r\n#LoadModule mime_magic_module lib\/apache\/mod_mime_magic.so\r\n#LoadModule expires_module lib\/apache\/mod_expires.so\r\nLoadModule headers_module lib\/apache\/mod_headers.so\r\n#LoadModule usertrack_module lib\/apache\/mod_usertrack.so\r\n#LoadModule unique_id_module lib\/apache\/mod_unique_id.so\r\nLoadModule setenvif_module lib\/apache\/mod_setenvif.so\r\nLoadModule version_module lib\/apache\/mod_version.so\r\n#LoadModule remoteip_module lib\/apache\/mod_remoteip.so\r\n#LoadModule proxy_module lib\/apache\/mod_proxy.so\r\n#LoadModule proxy_connect_module lib\/apache\/mod_proxy_connect.so\r\n#LoadModule proxy_ftp_module lib\/apache\/mod_proxy_ftp.so\r\n#LoadModule proxy_http_module lib\/apache\/mod_proxy_http.so\r\n#LoadModule proxy_fcgi_module lib\/apache\/mod_proxy_fcgi.so\r\n#LoadModule proxy_scgi_module lib\/apache\/mod_proxy_scgi.so\r\n#LoadModule proxy_uwsgi_module lib\/apache\/mod_proxy_uwsgi.so\r\n#LoadModule proxy_fdpass_module lib\/apache\/mod_proxy_fdpass.so\r\n#LoadModule proxy_wstunnel_module lib\/apache\/mod_proxy_wstunnel.so\r\n#LoadModule proxy_ajp_module lib\/apache\/mod_proxy_ajp.so\r\n#LoadModule proxy_balancer_module lib\/apache\/mod_proxy_balancer.so\r\n#LoadModule proxy_express_module lib\/apache\/mod_proxy_express.so\r\n#LoadModule proxy_hcheck_module lib\/apache\/mod_proxy_hcheck.so\r\n#LoadModule session_module lib\/apache\/mod_session.so\r\n#LoadModule session_cookie_module lib\/apache\/mod_session_cookie.so\r\n#LoadModule session_dbd_module lib\/apache\/mod_session_dbd.so\r\n#LoadModule slotmem_shm_module lib\/apache\/mod_slotmem_shm.so\r\n#LoadModule slotmem_plain_module lib\/apache\/mod_slotmem_plain.so\r\nLoadModule ssl_module lib\/apache\/mod_ssl.so\r\n#LoadModule dialup_module lib\/apache\/mod_dialup.so\r\nLoadModule http2_module lib\/apache\/mod_http2.so\r\n#LoadModule lbmethod_byrequests_module lib\/apache\/mod_lbmethod_byrequests.so\r\n#LoadModule lbmethod_bytraffic_module lib\/apache\/mod_lbmethod_bytraffic.so\r\n#LoadModule lbmethod_bybusyness_module lib\/apache\/mod_lbmethod_bybusyness.so\r\n#LoadModule lbmethod_heartbeat_module lib\/apache\/mod_lbmethod_heartbeat.so\r\nLoadModule unixd_module lib\/apache\/mod_unixd.so\r\n#LoadModule heartbeat_module lib\/apache\/mod_heartbeat.so\r\n#LoadModule heartmonitor_module lib\/apache\/mod_heartmonitor.so\r\n#LoadModule dav_module lib\/apache\/mod_dav.so\r\nLoadModule status_module lib\/apache\/mod_status.so\r\nLoadModule autoindex_module lib\/apache\/mod_autoindex.so\r\n#LoadModule asis_module lib\/apache\/mod_asis.so\r\n#LoadModule info_module lib\/apache\/mod_info.so\r\n#LoadModule cgid_module lib\/apache\/mod_cgid.so\r\n#LoadModule dav_fs_module lib\/apache\/mod_dav_fs.so\r\n#LoadModule dav_lock_module lib\/apache\/mod_dav_lock.so\r\n#LoadModule vhost_alias_module lib\/apache\/mod_vhost_alias.so\r\n#LoadModule negotiation_module lib\/apache\/mod_negotiation.so\r\nLoadModule dir_module lib\/apache\/mod_dir.so\r\n#LoadModule actions_module lib\/apache\/mod_actions.so\r\n#LoadModule speling_module lib\/apache\/mod_speling.so\r\n#LoadModule userdir_module lib\/apache\/mod_userdir.so\r\nLoadModule alias_module lib\/apache\/mod_alias.so\r\n#LoadModule rewrite_module lib\/apache\/mod_rewrite.so\r\n\r\n# 'Main' server configuration\r\n#\r\n# The directives in this section set up the values used by the 'main'\r\n# server, which responds to any requests that aren't handled by a\r\n# &lt;VirtualHost&gt; definition.  These values also provide defaults for\r\n# any &lt;VirtualHost&gt; containers you may define later in the file.\r\n#\r\n# All of these directives may appear inside &lt;VirtualHost&gt; containers,\r\n# in which case these default settings will be overridden for the\r\n# virtual host being defined.\r\n#\r\n\r\n#\r\n# ServerAdmin: Your address, where problems with the server should be\r\n# e-mailed.  This address appears on some server-generated pages, such\r\n# as error documents.  e.g. admin@your-domain.com\r\n#\r\n#ServerAdmin you@example.com\r\n\r\n#\r\n# ServerName gives the name and port that the server uses to identify itself.\r\n# This can often be determined automatically, but we recommend you specify\r\n# it explicitly to prevent problems during startup.\r\n#\r\n# If your host doesn't have a registered DNS name, enter its IP address here.\r\n#\r\n#ServerName www.example.com:80\r\n\r\n#\r\n# Deny access to the entirety of your server's filesystem. You must\r\n# explicitly permit access to web content directories in other \r\n# &lt;Directory&gt; blocks below.\r\n#\r\n&lt;Directory \/&gt;\r\n    AllowOverride none\r\n    Require all denied\r\n&lt;\/Directory&gt;\r\n\r\n#\r\n# Note that from this point forward you must specifically allow\r\n# particular features to be enabled - so if something's not working as\r\n# you might expect, make sure that you have specifically enabled it\r\n# below.\r\n#\r\n\r\n#\r\n# DocumentRoot: The directory out of which you will serve your\r\n# documents. By default, all requests are taken from this directory, but\r\n# symbolic links and aliases may be used to point to other locations.\r\n#\r\nDocumentRoot \"\/var\/www\/html\"\r\n&lt;Directory \"\/var\/www\/html\"&gt;\r\n    #\r\n    # Possible values for the Options directive are \"None\", \"All\",\r\n    # or any combination of:\r\n    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews\r\n    #\r\n    # Note that \"MultiViews\" must be named *explicitly* --- \"Options All\"\r\n    # doesn't give it to you.\r\n    #\r\n    # The Options directive is both complicated and important.  Please see\r\n    # http:\/\/httpd.apache.org\/docs\/2.4\/mod\/core.html#options\r\n    # for more information.\r\n    #\r\n    Options FollowSymLinks\r\n\r\n    #\r\n    # AllowOverride controls what directives may be placed in .htaccess files.\r\n    # It can be \"All\", \"None\", or any combination of the keywords:\r\n    #   AllowOverride FileInfo AuthConfig Limit\r\n    #\r\n    AllowOverride All\r\n\r\n    #\r\n    # Controls who can get stuff from this server.\r\n    #\r\n    Require all granted\r\n&lt;\/Directory&gt;\r\n\r\n#\r\n# DirectoryIndex: sets the file that Apache will serve if a directory\r\n# is requested.\r\n#\r\n&lt;IfModule dir_module&gt;\r\n    DirectoryIndex index.html\r\n&lt;\/IfModule&gt;\r\n\r\n#\r\n# The following lines prevent .htaccess and .htpasswd files from being \r\n# viewed by Web clients. \r\n#\r\n&lt;Files \".ht*\"&gt;\r\n    Require all denied\r\n&lt;\/Files&gt;\r\n\r\n#\r\n# ErrorLog: The location of the error log file.\r\n# If you do not specify an ErrorLog directive within a &lt;VirtualHost&gt;\r\n# container, error messages relating to that virtual host will be\r\n# logged here.  If you *do* define an error logfile for a &lt;VirtualHost&gt;\r\n# container, that host's errors will be logged there and not here.\r\n#\r\nErrorLog \"\/var\/log\/httpd\/error_log\"\r\n\r\n#\r\n# LogLevel: Control the number of messages logged to the error_log.\r\n# Possible values include: debug, info, notice, warn, error, crit,\r\n# alert, emerg.\r\n#\r\nLogLevel warn\r\n\r\n&lt;IfModule log_config_module&gt;\r\n    #\r\n    # The following directives define some format nicknames for use with\r\n    # a CustomLog directive (see below).\r\n    #\r\n    LogFormat \"%h %l %u %t \\\"%r\\\" %&gt;s %b \\\"%{Referer}i\\\" \\\"%{User-Agent}i\\\"\" combined\r\n    LogFormat \"%h %l %u %t \\\"%r\\\" %&gt;s %b\" common\r\n\r\n    &lt;IfModule logio_module&gt;\r\n      # You need to enable mod_logio.c to use %I and %O\r\n      LogFormat \"%h %l %u %t \\\"%r\\\" %&gt;s %b \\\"%{Referer}i\\\" \\\"%{User-Agent}i\\\" %I %O\" combinedio\r\n    &lt;\/IfModule&gt;\r\n\r\n    #\r\n    # The location and format of the access logfile (Common Logfile Format).\r\n    # If you do not define any access logfiles within a &lt;VirtualHost&gt;\r\n    # container, they will be logged here.  Contrariwise, if you *do*\r\n    # define per-&lt;VirtualHost&gt; access logfiles, transactions will be\r\n    # logged therein and *not* in this file.\r\n    #\r\n    CustomLog \"\/var\/log\/httpd\/access_log\" common\r\n\r\n    #\r\n    # If you prefer a logfile with access, agent, and referer information\r\n    # (Combined Logfile Format) you can use the following directive.\r\n    #\r\n    #CustomLog \"\/var\/log\/httpd\/access_log\" combined\r\n&lt;\/IfModule&gt;\r\n\r\n&lt;IfModule mpm_event_module&gt;\r\n    StartServers 3\r\n    MinSpareThreads 75\r\n    MaxSpareThreads 250\r\n    ThreadsPerChild 25\r\n    MaxRequestWorkers 400\r\n    MaxConnectionsPerChild 0\r\n&lt;\/IfModule&gt;\r\n\r\n&lt;IfModule alias_module&gt;\r\n    #\r\n    # Redirect: Allows you to tell clients about documents that used to \r\n    # exist in your server's namespace, but do not anymore. The client \r\n    # will make a new request for the document at its new location.\r\n    # Example:\r\n    # Redirect permanent \/foo http:\/\/www.example.com\/bar\r\n\r\n    #\r\n    # Alias: Maps web paths into filesystem paths and is used to\r\n    # access content that does not live under the DocumentRoot.\r\n    # Example:\r\n    # Alias \/webpath \/full\/filesystem\/path\r\n    #\r\n    # If you include a trailing \/ on \/webpath then the server will\r\n    # require it to be present in the URL.  You will also likely\r\n    # need to provide a &lt;Directory&gt; section to allow access to\r\n    # the filesystem path.\r\n\r\n    #\r\n    # ScriptAlias: This controls which directories contain server scripts. \r\n    # ScriptAliases are essentially the same as Aliases, except that\r\n    # documents in the target directory are treated as applications and\r\n    # run by the server when requested rather than as documents sent to the\r\n    # client.  The same rules about trailing \"\/\" apply to ScriptAlias\r\n    # directives as to Alias.\r\n    #\r\n    ScriptAlias \/cgi-bin\/ \"\/var\/www\/cgi-bin\/\"\r\n\r\n&lt;\/IfModule&gt;\r\n\r\n&lt;IfModule cgid_module&gt;\r\n    #\r\n    # ScriptSock: On threaded servers, designate the path to the UNIX\r\n    # socket used to communicate with the CGI daemon of mod_cgid.\r\n    #\r\n    #Scriptsock cgisock\r\n&lt;\/IfModule&gt;\r\n\r\n#\r\n# \"\/var\/www\/cgi-bin\" should be changed to whatever your ScriptAliased\r\n# CGI directory exists, if you have that configured.\r\n#\r\n&lt;Directory \"\/var\/www\/cgi-bin\"&gt;\r\n    AllowOverride None\r\n    Options None\r\n    Require all granted\r\n&lt;\/Directory&gt;\r\n\r\n&lt;IfModule headers_module&gt;\r\n    #\r\n    # Avoid passing HTTP_PROXY environment to CGI's on this or any proxied\r\n    # backend servers which have lingering \"httpoxy\" defects.\r\n    # 'Proxy' request header is undefined by the IETF, not listed by IANA\r\n    #\r\n    RequestHeader unset Proxy early\r\n&lt;\/IfModule&gt;\r\n\r\n&lt;IfModule mime_module&gt;\r\n    #\r\n    # TypesConfig points to the file containing the list of mappings from\r\n    # filename extension to MIME-type.\r\n    #\r\n    TypesConfig \/etc\/httpd\/conf\/mime.types\r\n\r\n    #\r\n    # AddType allows you to add to or override the MIME configuration\r\n    # file specified in TypesConfig for specific file types.\r\n    #\r\n    #AddType application\/x-gzip .tgz\r\n    #\r\n    # AddEncoding allows you to have certain browsers uncompress\r\n    # information on the fly. Note: Not all browsers support this.\r\n    #\r\n    #AddEncoding x-compress .Z\r\n    #AddEncoding x-gzip .gz .tgz\r\n    #\r\n    # If the AddEncoding directives above are commented-out, then you\r\n    # probably should define those extensions to indicate media types:\r\n    #\r\n    AddType application\/x-compress .Z\r\n    AddType application\/x-gzip .gz .tgz\r\n\r\n    #\r\n    # AddHandler allows you to map certain file extensions to \"handlers\":\r\n    # actions unrelated to filetype. These can be either built into the server\r\n    # or added with the Action directive (see below)\r\n    #\r\n    # To use CGI scripts outside of ScriptAliased directories:\r\n    # (You will also need to add \"ExecCGI\" to the \"Options\" directive.)\r\n    #\r\n    #AddHandler cgi-script .cgi\r\n\r\n    # For type maps (negotiated resources):\r\n    #AddHandler type-map var\r\n\r\n    #\r\n    # Filters allow you to process content before it is sent to the client.\r\n    #\r\n    # To parse .shtml files for server-side includes (SSI):\r\n    # (You will also need to add \"Includes\" to the \"Options\" directive.)\r\n    #\r\n    #AddType text\/html .shtml\r\n    #AddOutputFilter INCLUDES .shtml\r\n&lt;\/IfModule&gt;\r\n\r\n&lt;IfModule mime_magic_module&gt;\r\n    MIMEMagicFile \/etc\/httpd\/conf\/magic\r\n&lt;\/IfModule&gt;\r\n\r\n\r\n#\r\n# The mod_mime_magic module allows the server to use various hints from the\r\n# contents of the file itself to determine its type.  The MIMEMagicFile\r\n# directive tells the module where the hint definitions are located.\r\n#\r\n#MIMEMagicFile \/etc\/httpd\/conf\/magic\r\n\r\n#\r\n# Customizable error responses come in three flavors:\r\n# 1) plain text 2) local redirects 3) external redirects\r\n#\r\n# Some examples:\r\n#ErrorDocument 500 \"The server made a boo boo.\"\r\n#ErrorDocument 404 \/missing.html\r\n#ErrorDocument 404 \"\/cgi-bin\/missing_handler.pl\"\r\n#ErrorDocument 402 http:\/\/www.example.com\/subscription_info.html\r\n#\r\n\r\n#\r\n# MaxRanges: Maximum number of Ranges in a request before\r\n# returning the entire resource, or one of the special\r\n# values 'default', 'none' or 'unlimited'.\r\n# Default setting is to accept 200 Ranges.\r\n#MaxRanges unlimited\r\n\r\n#\r\n# EnableMMAP and EnableSendfile: On systems that support it, \r\n# memory-mapping or the sendfile syscall may be used to deliver\r\n# files.  This usually improves server performance, but must\r\n# be turned off when serving from networked-mounted \r\n# filesystems or if support for these functions is otherwise\r\n# broken on your system.\r\n# Defaults: EnableMMAP On, EnableSendfile Off\r\n#\r\n#EnableMMAP off\r\n#EnableSendfile on\r\n\r\n# Supplemental configuration\r\n#\r\n# The configuration files in the \/etc\/httpd\/conf\/extra\/ directory can be \r\n# included to add extra features or to modify the default configuration of \r\n# the server, or you may simply copy their contents here and change as \r\n# necessary.\r\n\r\n# Server-pool management (MPM specific)\r\n#Include \/etc\/httpd\/conf\/extra\/httpd-mpm.conf\r\n\r\n# Multi-language error messages\r\n#Include \/etc\/httpd\/conf\/extra\/httpd-multilang-errordoc.conf\r\n\r\n# Fancy directory listings\r\n#Include \/etc\/httpd\/conf\/extra\/httpd-autoindex.conf\r\n\r\n# Language settings\r\n#Include \/etc\/httpd\/conf\/extra\/httpd-languages.conf\r\n\r\n# User home directories\r\n#Include \/etc\/httpd\/conf\/extra\/httpd-userdir.conf\r\n\r\n# Real-time info on requests and configuration\r\n#Include \/etc\/httpd\/conf\/extra\/httpd-info.conf\r\n\r\n# Virtual hosts\r\nInclude \/etc\/httpd\/conf\/extra\/httpd-vhosts.conf\r\n\r\n\r\n# Local access to the Apache HTTP Server Manual\r\n#Include \/etc\/httpd\/conf\/extra\/httpd-manual.conf\r\n\r\n# Distributed authoring and versioning (WebDAV)\r\n#Include \/etc\/httpd\/conf\/extra\/httpd-dav.conf\r\n\r\n# Various default settings\r\n#Include \/etc\/httpd\/conf\/extra\/httpd-default.conf\r\n\r\n# Configure mod_proxy_html to understand HTML4\/XHTML1\r\n\r\n#&lt;IfModule proxy_html_module&gt;\r\n#Include \/etc\/httpd\/conf\/extra\/proxy-html.conf\r\n#&lt;\/IfModule&gt;\r\n\r\n# Secure (SSL\/TLS) connections\r\nInclude \/etc\/httpd\/conf\/extra\/httpd-ssl.conf\r\n##\r\n## Note: The following must must be present to support\r\n##       starting without SSL on platforms with no \/dev\/random equivalent\r\n##       but a statically compiled-in mod_ssl.\r\n##\r\n&lt;IfModule ssl_module&gt;\r\nSSLRandomSeed startup builtin\r\nSSLRandomSeed connect builtin\r\n&lt;\/IfModule&gt;\r\n\r\n\r\n<\/code><\/pre>\n<h2>httpd-vhosts.conf\u6587\u4ef6\u7684\u914d\u7f6e<\/h2>\n<pre class=\"post-pre\"><code># Virtual Hosts\r\n#\r\n# Required modules: mod_log_config\r\n\r\n# If you want to maintain multiple domains\/hostnames on your\r\n# machine you can setup VirtualHost containers for them. Most configurations\r\n# use only name-based virtual hosts so the server doesn't need to worry about\r\n# IP addresses. This is indicated by the asterisks in the directives below.\r\n#\r\n# Please see the documentation at \r\n# &lt;URL:http:\/\/httpd.apache.org\/docs\/2.4\/vhosts\/&gt;\r\n# for further details before you try to setup virtual hosts.\r\n#\r\n# You may use the command line option '-S' to verify your virtual host\r\n# configuration.\r\n\r\n#\r\n# VirtualHost example:\r\n# Almost any Apache directive may go into a VirtualHost container.\r\n# The first VirtualHost section is used for all requests that do not\r\n# match a ServerName or ServerAlias in any &lt;VirtualHost&gt; block.\r\n#\r\n&lt;VirtualHost *:80&gt;\r\n    DocumentRoot \"\/var\/www\/html\/hogehogeA\"\r\n    ServerName hogehogeA.com\r\n    ServerAlias www.hogehogeA.com\r\n    AddDefaultCharset UTF-8\r\n    &lt;Directory \"\/var\/www\/html\/hogehogeA\"&gt;\r\n    AllowOverride All\r\n    &lt;\/Directory&gt;\r\n    ErrorLog \"\/var\/log\/httpd\/hogehogeA.com-error_log\"\r\n    CustomLog \"\/var\/log\/httpd\/hogehogeA.com-access_log\" common\r\n&lt;\/VirtualHost&gt;\r\n\r\n&lt;VirtualHost *:80&gt;\r\n    DocumentRoot \"\/var\/www\/html\/hogehogeB\"\r\n    ServerName hogehogeB.com\r\n    ServerAlias www.hogehogeB.com\r\n    AddDefaultCharset UTF-8\r\n    &lt;Directory \"\/var\/www\/html\/hogehogeB\"&gt;\r\n    AllowOverride All\r\n    &lt;\/Directory&gt;\r\n    ErrorLog \"\/var\/log\/httpd\/hogehogeB.com-error_log\"\r\n    CustomLog \"\/var\/log\/httpd\/hogehogeB.com-access_log\" common\r\n&lt;\/VirtualHost&gt;\r\n\r\n<\/code><\/pre>\n<h2>httpd-ssl.conf \u662f\u6307 Apache \u670d\u52a1\u5668\u7684 SSL \u914d\u7f6e\u6587\u4ef6\u3002<\/h2>\n<p>\u6211\u4eec\u5047\u8bbe\u60a8\u6b63\u5728\u4f7f\u7528Let&#8217;s Encrypt\u6765\u53d1\u884c\u8bc1\u4e66\u3002<\/p>\n<p>\u6211\u8981\u66f4\u6539httpd-ssl.conf\u6587\u4ef6\u3002<\/p>\n<pre class=\"post-pre\"><code>--------------------\r\n# nano \/etc\/httpd\/conf\/extra\/httpd-ssl.conf\r\n--------------------\r\nListen 443\r\nSSLPassPhraseDialog builtin\r\nSSLSessionCache \"shmcb:\/run\/httpd\/sslcache(1024000)\"\r\nSSLSessionCacheTimeout 3600\r\nSSLRandomSeed startup file:\/dev\/urandom  256\r\nSSLRandomSeed connect builtin\r\nSSLCryptoDevice builtin\r\nSSLStrictSNIVHostCheck off\r\n\r\nSSLProtocol -all +TLSv1.2 +TLSv1.3\r\n\r\nSSLCipherSuite \"TLS_AES_128_GCM_SHA256 \\\r\nTLS_AES_256_GCM_SHA384 \\\r\nTLS_CHACHA20_POLY1305_SHA256 \\\r\nECDHE-ECDSA-AES128-GCM-SHA256 \\\r\nECDHE-ECDSA-AES256-GCM-SHA384 \\\r\nECDHE-ECDSA-AES128-SHA \\\r\nECDHE-ECDSA-AES256-SHA \\\r\nECDHE-ECDSA-AES128-SHA256 \\\r\nECDHE-ECDSA-AES256-SHA384 \\\r\nECDHE-RSA-AES128-GCM-SHA256 \\\r\nECDHE-RSA-AES256-GCM-SHA384 \\\r\nECDHE-RSA-AES128-SHA \\\r\nECDHE-RSA-AES256-SHA \\\r\nECDHE-RSA-AES128-SHA256 \\\r\nECDHE-RSA-AES256-SHA384 \\\r\nDHE-RSA-AES128-GCM-SHA256 \\\r\nDHE-RSA-AES256-GCM-SHA384 \\\r\nDHE-RSA-AES128-SHA \\\r\nDHE-RSA-AES256-SHA \\\r\nDHE-RSA-AES128-SHA256 \\\r\nDHE-RSA-AES256-SHA256 \\\r\nEDH-RSA-DES-CBC3-SHA\"\r\n\r\nSSLHonorCipherOrder on\r\nSSLCompression off\r\n#   Inter-Process Session Cache:\r\n#   Configure the SSL Session Cache: First the mechanism \r\n#   to use and second the expiring timeout (in seconds).\r\n#SSLSessionCache         \"dbm:\/var\/run\/ssl_scache\"\r\nSSLSessionCache        \"shmcb:\/var\/run\/ssl_scache(512000)\"\r\nSSLSessionCacheTimeout  300\r\n\r\n#SSLUseStapling On\r\n#SSLStaplingCache shmcb:\/run\/httpd\/stapling_cache(128000)\r\n\r\n#hogehogeA\u306e\u8a2d\u5b9a\r\n&lt;VirtualHost *:443&gt;\r\n\r\n    ServerName hogehogeA.com\r\n    ServerAlias www.hogehogeA.com\r\n    DocumentRoot \/var\/www\/html\/hogehogeA\r\n\r\n    &lt;Directory \"\/var\/www\/html\/hogehogeA\"&gt;\r\n        Options FollowSymLinks\r\n        AllowOverride All \r\n        Require all granted\r\n    &lt;\/Directory&gt;\r\n\r\n\r\n    SSLEngine on\r\n    SSLHonorCipherOrder on\r\n    Header set Strict-Transport-Security \"max-age=31536000; includeSubDomains\"\r\n    SSLProtocol -All +TLSv1 +TLSv1.1 +TLSv1.2\r\n    SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5\r\n    SSLCertificateFile \/etc\/letsencrypt\/live\/hogehogeA.com\/cert.pem\r\n    SSLCertificateKeyFile \/etc\/letsencrypt\/live\/hogehogeA.com\/privkey.pem\r\n    SSLCertificateChainFile \/etc\/letsencrypt\/live\/hogehogeA.com\/chain.pem\r\n\r\n    SetEnvIf Request_URI \"\\.(gif|jpg|png|css|js)$\" nolog\r\n    ErrorLog \"\/var\/log\/httpd\/hogehogeA.com-s-error_log\"\r\n    CustomLog \"\/var\/log\/httpd\/hogehogeA.com-s-access_log\" common\r\n&lt;\/VirtualHost&gt;\r\n\r\n#hogehogeB\u306e\u8a2d\u5b9a\r\n&lt;VirtualHost *:443&gt;\r\n\r\n    ServerName hogehogeB.com\r\n    ServerAlias www.hogehogeB.com\r\n    DocumentRoot \/var\/www\/html\/hogehogeB\r\n\r\n    &lt;Directory \"\/var\/www\/html\/hogehogeB\"&gt;\r\n        Options FollowSymLinks\r\n        AllowOverride All \r\n        Require all granted\r\n    &lt;\/Directory&gt;\r\n\r\n    SSLEngine on\r\n    SSLHonorCipherOrder on\r\n    Header set Strict-Transport-Security \"max-age=31536000; includeSubDomains\"\r\n    SSLProtocol -All +TLSv1 +TLSv1.1 +TLSv1.2\r\n    SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5\r\n    SSLCertificateFile \/etc\/letsencrypt\/live\/hogehogeB.com\/cert.pem\r\n    SSLCertificateKeyFile \/etc\/letsencrypt\/live\/hogehogeB.com\/privkey.pem\r\n    SSLCertificateChainFile \/etc\/letsencrypt\/live\/hogehogeB.com\/chain.pem\r\n\r\n    SetEnvIf Request_URI \"\\.(gif|jpg|png|css|js)$\" nolog\r\n    ErrorLog \"\/var\/log\/httpd\/hogehogeB.com-s-error_log\"\r\n    CustomLog \"\/var\/log\/httpd\/hogehogeB.com-s-access_log\" common\r\n&lt;\/VirtualHost&gt;\r\n<\/code><\/pre>\n<h1>\u5c06httpd.service\u8bbe\u7f6e\u4e3a\u914d\u7f6e\u3002<\/h1>\n<pre class=\"post-pre\"><code># nano \/etc\/systemd\/system\/httpd.service\r\n--------------------------------------\r\n[Unit]\r\nDescription=The Apache HTTP Server\r\nAfter=network.target remote-fs.target nss-lookup.target\r\n[Service]\r\nType=forking\r\nExecStart=\/usr\/sbin\/apachectl start\r\nExecReload=\/usr\/sbin\/apachectl graceful\r\nExecStop=\/usr\/sbin\/apachectl stop\r\n [Install]\r\nWantedBy=multi-user.target\r\n--------------------------------------\r\n\r\n# systemctl daemon-reload\r\n# systemctl start httpd\r\n# systemctl enable httpd\r\n<\/code><\/pre>\n<h1>\u7ed3\u675f<\/h1>\n<p>\u7ecf\u8fc7\u591a\u6b21\u5c1d\u8bd5\u548c\u67e5\u9605\u5404\u79cd\u6587\u7ae0\uff0c\u6211\u6210\u529f\u5730\u5b89\u88c5\u4e862.4.43+1.1.1g\u7248\u672c\u7684sshd\uff0c\u800c\u6ca1\u6709\u51fa\u73b0\u4efb\u4f55\u95ee\u9898\u3002\u4e3a\u4e86\u5c06\u6b64\u8fc7\u7a0b\u8bb0\u5f55\u4e0b\u6765\u4f5c\u4e3a\u5907\u5fd8\u5f55\uff0c\u6211\u4e5f\u5c06\u5176\u5199\u6210\u4e86\u6587\u7ae0\u3002<\/p>\n<h1>\u6211\u53c2\u8003\u4e86\u8fd9\u4e9b\u7f51\u7ad9\u7684\u5185\u5bb9<\/h1>\n<p>Apache httpd 2.4.43\uff08\u652f\u6301TLS1.3\uff09+ HTTP\/2 + Brotli \u5b89\u88c5\u7b14\u8bb0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6cea\u6c34\u7684sshd \u6211\u5728Sakura VPS\u4e0a\u8fdb\u884c\u4e86CentOS 8\u7684\u5b9a\u5236\u5b89\u88c5\u3002 \u6765\u5427\uff0c\u5f53\u6211\u5c1d\u8bd5\u5b89\u88c5Apache2 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-34674","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5c1d\u8bd5\u5b89\u88c5Apache httpd 2.4.43+HTTP\/2+Brotli\u5230Sakura VPS\u7684CentOS8\u73af\u5883 - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5c1d\u8bd5\u5b89\u88c5apache-httpd-2-4-43http-2brotli\u5230sakura-vps\u7684centos8\u73af\u5883\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5c1d\u8bd5\u5b89\u88c5Apache httpd 2.4.43+HTTP\/2+Brotli\u5230Sakura VPS\u7684CentOS8\u73af\u5883\" \/>\n<meta property=\"og:description\" content=\"\u6cea\u6c34\u7684sshd \u6211\u5728Sakura VPS\u4e0a\u8fdb\u884c\u4e86CentOS 8\u7684\u5b9a\u5236\u5b89\u88c5\u3002 \u6765\u5427\uff0c\u5f53\u6211\u5c1d\u8bd5\u5b89\u88c5Apache2 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5c1d\u8bd5\u5b89\u88c5apache-httpd-2-4-43http-2brotli\u5230sakura-vps\u7684centos8\u73af\u5883\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-13T06:40:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-29T03:39:11+00:00\" \/>\n<meta name=\"author\" content=\"\u97f5, \u79d1\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u97f5, \u79d1\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"20 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%ae%89%e8%a3%85apache-httpd-2-4-43http-2brotli%e5%88%b0sakura-vps%e7%9a%84centos8%e7%8e%af%e5%a2%83%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%ae%89%e8%a3%85apache-httpd-2-4-43http-2brotli%e5%88%b0sakura-vps%e7%9a%84centos8%e7%8e%af%e5%a2%83%e3%80%82\/\",\"name\":\"\u5c1d\u8bd5\u5b89\u88c5Apache httpd 2.4.43+HTTP\/2+Brotli\u5230Sakura VPS\u7684CentOS8\u73af\u5883 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2022-11-13T06:40:31+00:00\",\"dateModified\":\"2024-04-29T03:39:11+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%ae%89%e8%a3%85apache-httpd-2-4-43http-2brotli%e5%88%b0sakura-vps%e7%9a%84centos8%e7%8e%af%e5%a2%83%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%ae%89%e8%a3%85apache-httpd-2-4-43http-2brotli%e5%88%b0sakura-vps%e7%9a%84centos8%e7%8e%af%e5%a2%83%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%ae%89%e8%a3%85apache-httpd-2-4-43http-2brotli%e5%88%b0sakura-vps%e7%9a%84centos8%e7%8e%af%e5%a2%83%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5c1d\u8bd5\u5b89\u88c5Apache httpd 2.4.43+HTTP\/2+Brotli\u5230Sakura VPS\u7684CentOS8\u73af\u5883\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e\",\"name\":\"\u97f5, \u79d1\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g\",\"caption\":\"\u97f5, \u79d1\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunke\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%ae%89%e8%a3%85apache-httpd-2-4-43http-2brotli%e5%88%b0sakura-vps%e7%9a%84centos8%e7%8e%af%e5%a2%83%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5c1d\u8bd5\u5b89\u88c5Apache httpd 2.4.43+HTTP\/2+Brotli\u5230Sakura VPS\u7684CentOS8\u73af\u5883 - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u5c1d\u8bd5\u5b89\u88c5apache-httpd-2-4-43http-2brotli\u5230sakura-vps\u7684centos8\u73af\u5883\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5c1d\u8bd5\u5b89\u88c5Apache httpd 2.4.43+HTTP\/2+Brotli\u5230Sakura VPS\u7684CentOS8\u73af\u5883","og_description":"\u6cea\u6c34\u7684sshd \u6211\u5728Sakura VPS\u4e0a\u8fdb\u884c\u4e86CentOS 8\u7684\u5b9a\u5236\u5b89\u88c5\u3002 \u6765\u5427\uff0c\u5f53\u6211\u5c1d\u8bd5\u5b89\u88c5Apache2 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5c1d\u8bd5\u5b89\u88c5apache-httpd-2-4-43http-2brotli\u5230sakura-vps\u7684centos8\u73af\u5883\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-11-13T06:40:31+00:00","article_modified_time":"2024-04-29T03:39:11+00:00","author":"\u97f5, \u79d1","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u97f5, \u79d1","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"20 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%ae%89%e8%a3%85apache-httpd-2-4-43http-2brotli%e5%88%b0sakura-vps%e7%9a%84centos8%e7%8e%af%e5%a2%83%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%ae%89%e8%a3%85apache-httpd-2-4-43http-2brotli%e5%88%b0sakura-vps%e7%9a%84centos8%e7%8e%af%e5%a2%83%e3%80%82\/","name":"\u5c1d\u8bd5\u5b89\u88c5Apache httpd 2.4.43+HTTP\/2+Brotli\u5230Sakura VPS\u7684CentOS8\u73af\u5883 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2022-11-13T06:40:31+00:00","dateModified":"2024-04-29T03:39:11+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%ae%89%e8%a3%85apache-httpd-2-4-43http-2brotli%e5%88%b0sakura-vps%e7%9a%84centos8%e7%8e%af%e5%a2%83%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%ae%89%e8%a3%85apache-httpd-2-4-43http-2brotli%e5%88%b0sakura-vps%e7%9a%84centos8%e7%8e%af%e5%a2%83%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%ae%89%e8%a3%85apache-httpd-2-4-43http-2brotli%e5%88%b0sakura-vps%e7%9a%84centos8%e7%8e%af%e5%a2%83%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5c1d\u8bd5\u5b89\u88c5Apache httpd 2.4.43+HTTP\/2+Brotli\u5230Sakura VPS\u7684CentOS8\u73af\u5883"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e","name":"\u97f5, \u79d1","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g","caption":"\u97f5, \u79d1"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunke\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e5%ae%89%e8%a3%85apache-httpd-2-4-43http-2brotli%e5%88%b0sakura-vps%e7%9a%84centos8%e7%8e%af%e5%a2%83%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34674","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=34674"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34674\/revisions"}],"predecessor-version":[{"id":85052,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34674\/revisions\/85052"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=34674"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=34674"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=34674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}