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