]>
Commit | Line | Data |
---|---|---|
e157932f ER |
1 | # This is the main Apache HTTP server configuration file. |
2 | # It contains the configuration directives that give the server its instructions. | |
9d781f9b | 3 | # |
e157932f | 4 | # This config aims to be clean and readable. |
58ab2e29 | 5 | # See <http://httpd.apache.org/docs/2.4> for detailed information. |
987d196f | 6 | # In particular, see |
58ab2e29 | 7 | # <http://httpd.apache.org/docs/2.4/mod/directives.html> |
e157932f | 8 | # for a discussion of each configuration directive. |
4af76ed4 | 9 | |
58d2eaf1 AM |
10 | ServerRoot "/etc/httpd" |
11 | ||
8ae11478 | 12 | LoadModule unixd_module modules/mod_unixd.so |
c7fbb6d9 | 13 | |
e157932f ER |
14 | # User/Group: The name (or #number) of the user/group to run httpd as. |
15 | # It is usually good practice to create a dedicated user and group for | |
16 | # running httpd, as with most system services. | |
17 | User http | |
18 | Group http | |
99ce08d7 | 19 | |
9d781f9b | 20 | # Listen: Allows you to bind Apache to specific IP addresses and/or |
e157932f | 21 | # ports, instead of the default. See also the <VirtualHost> |
9d781f9b MM |
22 | # directive. |
23 | # | |
53fc5f22 | 24 | # Change this to Listen on specific IP addresses as shown below to |
e157932f ER |
25 | # prevent Apache from glomming onto all bound IP addresses. |
26 | #Listen 192.168.1.1:80 | |
9d781f9b | 27 | Listen 80 |
4af76ed4 | 28 | |
4af76ed4 | 29 | # ServerAdmin: Your address, where problems with the server should be |
8ae11478 ER |
30 | # e-mailed. This address appears on some server-generated pages, such |
31 | # as error documents. e.g. admin@example.com | |
4af76ed4 | 32 | # |
65cd19d5 | 33 | ServerAdmin root@example.com |
4af76ed4 | 34 | |
9d781f9b MM |
35 | # ServerName gives the name and port that the server uses to identify itself. |
36 | # This can often be determined automatically, but we recommend you specify | |
37 | # it explicitly to prevent problems during startup. | |
38 | # | |
4af76ed4 | 39 | # If your host doesn't have a registered DNS name, enter its IP address here. |
4af76ed4 | 40 | # |
53fc5f22 | 41 | ServerName localhost |
4af76ed4 | 42 | |
9d781f9b MM |
43 | # ErrorLog: The location of the error log file. |
44 | # If you do not specify an ErrorLog directive within a <VirtualHost> | |
45 | # container, error messages relating to that virtual host will be | |
8ae11478 | 46 | # logged here. If you *do* define an error logfile for a <VirtualHost> |
9d781f9b | 47 | # container, that host's errors will be logged there and not here. |
e157932f | 48 | ErrorLog logs/error_log |
d929f060 ER |
49 | |
50 | # ErrorLogFormat [connection|request] format | |
51 | # Format specification for error log entries | |
52 | # https://httpd.apache.org/docs/2.4/mod/core.html#errorlogformat | |
53 | # There is no default value, Apache uses different built in function if | |
54 | # ErrorLogFormat is not defined. | |
4e5e777f | 55 | #ErrorLogFormat "[%{u}t] [%m:%l] [pid\ %P] [client\ %a] [vhost\ %v] %M" |
9d781f9b | 56 | |
9d781f9b MM |
57 | # LogLevel: Control the number of messages logged to the error_log. |
58 | # Possible values include: debug, info, notice, warn, error, crit, | |
59 | # alert, emerg. | |
9d781f9b MM |
60 | LogLevel warn |
61 | ||
061ad5b2 | 62 | Timeout 60 |
50707f42 ER |
63 | KeepAlive On |
64 | MaxKeepAliveRequests 100 | |
65 | KeepAliveTimeout 5 | |
b06b509a | 66 | UseCanonicalName Off |
50707f42 | 67 | AccessFileName .htaccess |
0490814b | 68 | ServerTokens Prod |
50707f42 ER |
69 | ServerSignature On |
70 | HostnameLookups Off | |
2d070148 | 71 | #AddDefaultCharset UTF-8 |
50707f42 | 72 | |
786e71ff PG |
73 | TraceEnable Off |
74 | ||
1a1cb04d | 75 | # |
8ae11478 ER |
76 | # EnableMMAP and EnableSendfile: On systems that support it, memory-mapping or |
77 | # the sendfile syscall may be used to deliver files. | |
78 | # This usually improves server performance, but must be turned off when serving | |
79 | # from networked-mounted filesystems or if support for these functions is | |
80 | # otherwise broken on your system. | |
1a1cb04d AM |
81 | # Defaults if commented: EnableMMAP On, EnableSendfile Off |
82 | # | |
83 | #EnableMMAP off | |
84 | EnableSendfile on | |
85 | ||
e157932f | 86 | # Include other modules and packages config. |
61ffca13 | 87 | IncludeOptional conf.d/*.conf |
ac2899f4 | 88 | |
e157932f | 89 | # Include webapps config |
61ffca13 | 90 | IncludeOptional webapps.d/*.conf |
775a4f24 | 91 | |
061ad5b2 AM |
92 | # |
93 | # Set a timeout for how long the client may take to send the request header | |
94 | # and body. | |
95 | # The default for the headers is header=20-40,MinRate=500, which means wait | |
96 | # for the first byte of headers for 20 seconds. If some data arrives, | |
97 | # increase the timeout corresponding to a data rate of 500 bytes/s, but not | |
98 | # above 40 seconds. | |
99 | # The default for the request body is body=20,MinRate=500, which is the same | |
100 | # but has no upper limit for the timeout. | |
101 | # To disable, set to header=0 body=0 | |
102 | # | |
103 | <IfModule reqtimeout_module> | |
8ae11478 | 104 | RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500 |
061ad5b2 AM |
105 | </IfModule> |
106 | ||
775a4f24 ER |
107 | <IfModule alias_module> |
108 | # ScriptAlias: This controls which directories contain server scripts. | |
109 | # ScriptAliases are essentially the same as Aliases, except that | |
110 | # documents in the target directory are treated as applications and | |
111 | # run by the server when requested rather than as documents sent to the | |
8ae11478 | 112 | # client. The same rules about trailing "/" apply to ScriptAlias |
775a4f24 ER |
113 | # directives as to Alias. |
114 | # | |
115 | ScriptAlias /cgi-bin/ "/home/services/httpd/cgi-bin/" | |
116 | ||
117 | <Directory "/home/services/httpd/cgi-bin"> | |
118 | AllowOverride None | |
119 | Options None | |
120 | <IfModule mod_authz_host.c> | |
40ca719a | 121 | Require all granted |
775a4f24 | 122 | </IfModule> |
e92e5081 JR |
123 | <IfModule mod_access_compat.c> |
124 | Order allow,deny | |
125 | Allow from all | |
126 | </IfModule> | |
775a4f24 ER |
127 | </Directory> |
128 | </IfModule> | |
a6f9c2c2 ER |
129 | |
130 | # VirtualHost: Allows the daemon to respond to requests for more than one | |
131 | # server address, if your server machine is configured to accept IP packets | |
132 | # for multiple addresses. This can be accomplished with the ifconfig | |
133 | # alias flag, or through kernel patches like VIF. | |
134 | ||
135 | # Any apache.conf conf directive may go into a VirtualHost command. | |
136 | # See also the BindAddress entry. | |
137 | ||
860c70b0 | 138 | # Setup default vhost (first one defined in config) and include vhosts configuration |
85805405 | 139 | <VirtualHost *:80> |
8ae11478 | 140 | ServerName localhost |
860c70b0 | 141 | # ServerAdmin webmaster@host.example.com |
784c115f | 142 | # DocumentRoot /www/docs/host.example.com |
860c70b0 ER |
143 | # ErrorLog logs/host.example.com-error_log |
144 | # TransferLog logs/host.example.com-access_log | |
145 | </VirtualHost> | |
146 | ||
61ffca13 | 147 | IncludeOptional vhosts.d/*.conf |