|
| 1 | +# It is split into several files forming the configuration hierarchy outlined |
| 2 | +# below, all located in the /etc/apache2/ directory: |
| 3 | +# |
| 4 | +# /etc/apache2/ |
| 5 | +# |-- apache2.conf |
| 6 | +# | `-- ports.conf |
| 7 | +# |-- mods-enabled |
| 8 | +# | |-- *.load |
| 9 | +# | `-- *.conf |
| 10 | +# |-- conf.d |
| 11 | +# | `-- * |
| 12 | + |
| 13 | +# Global configuration |
| 14 | +PidFile ${APACHE_PID_FILE} |
| 15 | +Timeout 30 |
| 16 | +KeepAlive Off |
| 17 | +MaxKeepAliveRequests 100 |
| 18 | +KeepAliveTimeout 10 |
| 19 | + |
| 20 | +<IfModule mpm_prefork_module> |
| 21 | + StartServers 8 |
| 22 | + MinSpareServers 5 |
| 23 | + MaxSpareServers 20 |
| 24 | + ServerLimit 256 |
| 25 | + MaxClients 200 |
| 26 | + MaxRequestsPerChild 4000 |
| 27 | +</IfModule> |
| 28 | + |
| 29 | +<IfModule mpm_worker_module> |
| 30 | + StartServers 2 |
| 31 | + MinSpareThreads 25 |
| 32 | + MaxSpareThreads 75 |
| 33 | + ThreadLimit 64 |
| 34 | + ThreadsPerChild 25 |
| 35 | + MaxClients 200 |
| 36 | + MaxRequestsPerChild 4000 |
| 37 | +</IfModule> |
| 38 | + |
| 39 | +<IfModule mpm_event_module> |
| 40 | + StartServers 2 |
| 41 | + MinSpareThreads 25 |
| 42 | + MaxSpareThreads 75 |
| 43 | + ThreadLimit 64 |
| 44 | + ThreadsPerChild 25 |
| 45 | + MaxClients 200 |
| 46 | + MaxRequestsPerChild 4000 |
| 47 | +</IfModule> |
| 48 | + |
| 49 | +# These need to be set in /etc/apache2/envvars |
| 50 | +User ${APACHE_RUN_USER} |
| 51 | +Group ${APACHE_RUN_GROUP} |
| 52 | +#User www-data |
| 53 | +#Group www-data |
| 54 | + |
| 55 | +AccessFileName .htaccess |
| 56 | + |
| 57 | +<Files ~ "^\.ht"> |
| 58 | + Order allow,deny |
| 59 | + Deny from all |
| 60 | + Satisfy all |
| 61 | +</Files> |
| 62 | + |
| 63 | +DefaultType None |
| 64 | +HostnameLookups Off |
| 65 | + |
| 66 | +ErrorLog ${APACHE_LOG_DIR}/error.log |
| 67 | +LogLevel warn |
| 68 | + |
| 69 | +# Include module configuration: |
| 70 | +Include mods-enabled/*.load |
| 71 | +Include mods-enabled/*.conf |
| 72 | + |
| 73 | +# Include list of ports to listen on and which to use for name based vhosts |
| 74 | +Include ports.conf |
| 75 | + |
| 76 | +LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined |
| 77 | +LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined |
| 78 | +LogFormat "%h %l %u %t \"%r\" %>s %O" common |
| 79 | +LogFormat "%{Referer}i -> %U" referer |
| 80 | +LogFormat "%{User-agent}i" agent |
| 81 | +LogFormat "%b" bytes |
| 82 | + |
| 83 | +Include conf.d/ |
| 84 | + |
| 85 | +# Include the virtual host configurations: |
| 86 | +#Include sites-enabled/ |
| 87 | + |
| 88 | +ErrorDocument 403 /error/403.html |
| 89 | +ErrorDocument 404 /error/404.html |
| 90 | +ErrorDocument 500 /error/50x.html |
| 91 | +ErrorDocument 501 /error/50x.html |
| 92 | +ErrorDocument 502 /error/50x.html |
| 93 | +ErrorDocument 503 /error/50x.html |
| 94 | +ErrorDocument 506 /error/50x.html |
0 commit comments