|
| 1 | +# Consolidated apache2.conf, mods-enabled/* and conf-enabled/*. |
| 2 | +ServerRoot ${APACHE_SERVER_ROOT} |
| 3 | +DefaultRuntimeDir ${APACHE_RUN_DIR} |
| 4 | +PidFile ${APACHE_PID_FILE} |
| 5 | +Timeout 60 |
| 6 | +KeepAlive On |
| 7 | +MaxKeepAliveRequests 100 |
| 8 | +KeepAliveTimeout 5 |
| 9 | +HostnameLookups Off |
| 10 | +ErrorLog ${APACHE_LOG_DIR}/error.log |
| 11 | +LogLevel info |
| 12 | + |
| 13 | +# Inline load module |
| 14 | +LoadModule access_compat_module ${APACHE_NIX_STORE}/modules/mod_access_compat.so |
| 15 | +LoadModule alias_module ${APACHE_NIX_STORE}/modules/mod_alias.so |
| 16 | +LoadModule auth_basic_module ${APACHE_NIX_STORE}/modules/mod_auth_basic.so |
| 17 | +LoadModule authn_core_module ${APACHE_NIX_STORE}/modules/mod_authn_core.so |
| 18 | +LoadModule authn_file_module ${APACHE_NIX_STORE}/modules/mod_authn_file.so |
| 19 | +LoadModule authz_core_module ${APACHE_NIX_STORE}/modules/mod_authz_core.so |
| 20 | +LoadModule authz_host_module ${APACHE_NIX_STORE}/modules/mod_authz_host.so |
| 21 | +LoadModule authz_user_module ${APACHE_NIX_STORE}/modules/mod_authz_user.so |
| 22 | +LoadModule autoindex_module ${APACHE_NIX_STORE}/modules/mod_autoindex.so |
| 23 | +LoadModule dir_module ${APACHE_NIX_STORE}/modules/mod_dir.so |
| 24 | +LoadModule deflate_module ${APACHE_NIX_STORE}/modules/mod_deflate.so |
| 25 | +LoadModule env_module ${APACHE_NIX_STORE}/modules/mod_env.so |
| 26 | +LoadModule filter_module ${APACHE_NIX_STORE}/modules/mod_filter.so |
| 27 | +LoadModule log_config_module ${APACHE_NIX_STORE}/modules/mod_log_config.so |
| 28 | +LoadModule mime_module ${APACHE_NIX_STORE}/modules/mod_mime.so |
| 29 | +LoadModule mpm_event_module ${APACHE_NIX_STORE}/modules/mod_mpm_event.so |
| 30 | +LoadModule reqtimeout_module ${APACHE_NIX_STORE}/modules/mod_reqtimeout.so |
| 31 | +LoadModule rewrite_module ${APACHE_NIX_STORE}/modules/mod_rewrite.so |
| 32 | +LoadModule setenvif_module ${APACHE_NIX_STORE}/modules/mod_setenvif.so |
| 33 | +LoadModule socache_shmcb_module ${APACHE_NIX_STORE}/modules/mod_socache_shmcb.so |
| 34 | +LoadModule ssl_module ${APACHE_NIX_STORE}/modules/mod_ssl.so |
| 35 | +LoadModule status_module ${APACHE_NIX_STORE}/modules/mod_status.so |
| 36 | +LoadModule unixd_module ${APACHE_NIX_STORE}/modules/mod_unixd.so |
| 37 | + |
| 38 | +# Include list of ports to listen on |
| 39 | +Include conf/ports.conf |
| 40 | + |
| 41 | +<IfModule unixd_module> |
| 42 | + User ${APACHE_RUN_USER} |
| 43 | + Group ${APACHE_RUN_GROUP} |
| 44 | +</IfModule> |
| 45 | + |
| 46 | +DocumentRoot ${APACHE_SERVER_ROOT}/www/html |
| 47 | +<Directory /> |
| 48 | + Options FollowSymLinks |
| 49 | + AllowOverride None |
| 50 | + Require all denied |
| 51 | +</Directory> |
| 52 | + |
| 53 | +<Directory ${APACHE_SERVER_ROOT}/www/html> |
| 54 | + Options Indexes FollowSymLinks |
| 55 | + AllowOverride None |
| 56 | + Require all granted |
| 57 | +</Directory> |
| 58 | + |
| 59 | +AccessFileName .htaccess |
| 60 | + |
| 61 | +LogFormat "%v:%p %h %l %u %t \"%r\" %>s \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined |
| 62 | +LogFormat "%h %l %u %t \"%r\" %>s \"%{Referer}i\" \"%{User-Agent}i\"" combined |
| 63 | +LogFormat "%h %l %u %t \"%r\" %>s " common |
| 64 | +LogFormat "%{Referer}i -> %U" referer |
| 65 | +LogFormat "%{User-agent}i" agent |
| 66 | +CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined |
| 67 | + |
| 68 | +# Include the virtual host configurations: |
| 69 | +IncludeOptional sites-enabled/*.conf |
| 70 | + |
| 71 | +# inline module configs |
| 72 | +<IfModule mod_mime.c> |
| 73 | + TypesConfig ${APACHE_NIX_STORE}/conf/mime.types |
| 74 | + AddType application/x-compress .Z |
| 75 | + AddType application/x-gzip .gz .tgz |
| 76 | + AddType application/x-bzip2 .bz2 |
| 77 | + AddLanguage en .en |
| 78 | + AddCharset us-ascii .ascii .us-ascii |
| 79 | + AddCharset ISO-8859-1 .iso8859-1 .latin1 |
| 80 | + AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen |
| 81 | + AddCharset ISO-8859-3 .iso8859-3 .latin3 |
| 82 | + AddCharset ISO-8859-4 .iso8859-4 .latin4 |
| 83 | + AddCharset ISO-8859-9 .iso8859-9 .latin5 .trk |
| 84 | + AddCharset ISO-8859-10 .iso8859-10 .latin6 |
| 85 | + AddCharset ISO-8859-13 .iso8859-13 |
| 86 | + AddCharset ISO-8859-14 .iso8859-14 .latin8 |
| 87 | + AddCharset ISO-8859-15 .iso8859-15 .latin9 |
| 88 | + AddCharset ISO-8859-16 .iso8859-16 .latin10 |
| 89 | + # For russian, more than one charset is used (depends on client, mostly): |
| 90 | + AddCharset WINDOWS-1251 .cp-1251 .win-1251 |
| 91 | + AddCharset CP866 .cp866 |
| 92 | + AddCharset ISO-10646-UCS-2 .ucs2 |
| 93 | + AddCharset ISO-10646-UCS-4 .ucs4 |
| 94 | + AddCharset UTF-7 .utf7 |
| 95 | + AddCharset UTF-8 .utf8 |
| 96 | + AddCharset UTF-16 .utf16 |
| 97 | + AddCharset UTF-16BE .utf16be |
| 98 | + AddCharset UTF-16LE .utf16le |
| 99 | + AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2 |
| 100 | + AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4 |
| 101 | + AddCharset shift_jis .shift_jis .sjis |
| 102 | + AddCharset BRF .brf |
| 103 | + |
| 104 | + AddHandler type-map var |
| 105 | + AddType text/html .shtml |
| 106 | +<IfModule mod_include.c> |
| 107 | + AddOutputFilter INCLUDES .shtml |
| 108 | +</IfModule> |
| 109 | + |
| 110 | +</IfModule> |
| 111 | + |
| 112 | +<IfModule mod_ssl.c> |
| 113 | + SSLRandomSeed startup builtin |
| 114 | + SSLRandomSeed startup file:/dev/urandom 512 |
| 115 | + SSLRandomSeed connect builtin |
| 116 | + SSLRandomSeed connect file:/dev/urandom 512 |
| 117 | + AddType application/x-x509-ca-cert .crt |
| 118 | + AddType application/x-pkcs7-crl .crl |
| 119 | + SSLSessionCache shmcb:${APACHE_RUN_DIR}/ssl_scache(512000) |
| 120 | + SSLSessionCacheTimeout 300 |
| 121 | + SSLCipherSuite HIGH:!aNULL |
| 122 | + SSLProtocol all -SSLv3 |
| 123 | +</IfModule> |
| 124 | + |
| 125 | +<IfModule mod_negotiation.c> |
| 126 | + LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv tr zh-CN zh-TW |
| 127 | + ForceLanguagePriority Prefer Fallback |
| 128 | +</IfModule> |
| 129 | +<IfModule mpm_event_module> |
| 130 | + StartServers 2 |
| 131 | + MinSpareThreads 25 |
| 132 | + MaxSpareThreads 75 |
| 133 | + ThreadLimit 64 |
| 134 | + ThreadsPerChild 25 |
| 135 | + MaxRequestWorkers 150 |
| 136 | + MaxConnectionsPerChild 0 |
| 137 | +</IfModule> |
| 138 | +<IfModule reqtimeout_module> |
| 139 | + RequestReadTimeout header=20-40,minrate=500 |
| 140 | + RequestReadTimeout body=10,minrate=500 |
| 141 | +</IfModule> |
| 142 | + |
| 143 | +# === end module configs |
| 144 | + |
| 145 | + |
| 146 | +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet |
0 commit comments