This repository was archived by the owner on Feb 6, 2025. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathx.conf
More file actions
291 lines (240 loc) · 9.61 KB
/
Copy pathx.conf
File metadata and controls
291 lines (240 loc) · 9.61 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
ServerTokens OS
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
# Timeout: The number of seconds before receives and sends time out.
Timeout 60
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
KeepAlive Off
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
MaxKeepAliveRequests 100
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
KeepAliveTimeout 15
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>
# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule worker.c>
StartServers 4
MaxClients 300
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
Listen 127.0.0.1:80
#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule status_module modules/mod_status.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule substitute_module modules/mod_substitute.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule unique_id_module modules/mod_unique_id.so
# Load config files from the config directory "/etc/httpd/conf.d".
Include conf.d/*.conf
# User and Group
User apache
Group apache
# ServerAdmin is where certian emails are sent
ServerAdmin {SERVERADMIN}
# ServerName
ServerName {SERVERNAME}
# This is used in the log files
SetEnv ServerID "{SERVERID}"
# When off, use host and port to generate URLs, else, use ServerName
UseCanonicalName Off
# DocumentRoot: The directory out of which you will serve your documents.
DocumentRoot "{DOCUMENTROOT}"
# First, we configure the "default" to be a very restrictive set of features.
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
# Respond to what "index" file name?
DirectoryIndex index.html
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives. See also the AllowOverride
# directive.
AccessFileName .htaccess
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
<Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</Files>
# Note, we must enable "RewriteOptions inherit" on each VirtualHost
# for this to work
RewriteEngine on
# Disable TRACE|TRACK method (read: Cross Site Tracing)
# Demanded by PCI compliance
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
# TypesConfig describes where the mime.types file (or equivalent) is
# to be found.
TypesConfig /etc/mime.types
# DefaultType is the default MIME type the server.
DefaultType text/plain
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type. The MIMEMagicFile
# directive tells the module where the hint definitions are located.
<IfModule mod_mime_magic.c>
# MIMEMagicFile /usr/share/magic.mime
MIMEMagicFile conf/magic
</IfModule>
# HostnameLookups: Log the names of clients or just their IP addresses
HostnameLookups Off
# Where to log error messages to, including output from mod_wsgi
ErrorLog {ERRORLOG}
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
LogLevel warn
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
# ACN Log Format...
# Fields in this log format (all tab seperated):
# %t -> request time
# %D -> duration of request in microseconds
# %B -> bytes sent excluding headers
# %a -> remote IP
# %A -> local IP
# %p -> local port
# %{ServerID}e -> Server ID
# %v -> Virtual Host ServerName
# %m -> Request method
# %r -> First line of request
# %s -> Status of inital request
# %>s -> Final status of request (different than previous when internal redirects occur)
# %{Referer}i -> Referrer
# %{User-Agent}i -> User Agent
LogFormat "%t\t%D\t%B\t%a\t%A\t%p\t%{ServerID}e\t%v\t%m\t%r\t%s\t%>s\t%{Referer}i\t%{User-Agent}i" ACN_FULL
# ts -> timstamp
# cs -> client session
# ci -> client ip
# ri -> request id
# rl -> request line
# rh -> request host
# rs -> request scheme
# et -> response time
# eb -> response bytes
# es -> response status
# er -> response redirect
# qc -> query count
# qt -> query time
# ac -> app controller
# ad -> app data
LogFormat "{\
\"ts\":\"%t\",\
\"cs\":\"%{ClientSession}n\",\
\"ci\":\"%a\",\
\"ri\":\"%{UNIQUE_ID}e\",\
\"rl\":\"%r\",\
\"rh\":\"%{Host}i\",\
\"rs\":\"%{Scheme}i\",\
\"et\":%D,\
\"eb\":%B,\
\"es\":\"%>s\",\
\"er\":\"%{Location}o\",\
\"qc\":\"%{QueryCount}n\",\
\"qt\":\"%{QueryTime}n\",\
\"ac\":\"%{AppController}n\",\
\"ad\":\"%{AppData}n\"\
}" JSON_ACCESS_LOG
# ^^^ Note last item has no comma ^^^
# See: http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#formats
# For security reasons, starting with version 2.0.46, non-printable and
# other special characters in %r, %i and %o are escaped using \xhh
# sequences, where hh stands for the hexadecimal representation of the
# raw byte. Exceptions from this rule are " and \, which are escaped by
# prepending a backslash, and all whitespace characters, which are
# written in their C-style notation (\n, \t, etc)
#------------------------------------------------------------------------------
# # Example for how to skip logging certian requests.
# SetEnvIf Request_URI "^/LoadBalancer.php$" Log_Skip
# Let us log. Unless overridden in the VirtualHost, all requests logged to here
CustomLog {CUSTOMLOG} JSON_ACCESS_LOG env=!Log_Skip
# Set to one of: On | Off | EMail
ServerSignature Off
# Specify a default charset for all content served;
AddDefaultCharset UTF-8
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
# MIME-types for downloading Certificates and CRLs
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
# The following directives modify normal HTTP response behavior to
# handle known problems with browser implementations.
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash. This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# redirects for folders with DAV methods.
# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
# Include virtual hosts
Include conf.virtualhost.d/*.conf