Subversion Repositories configs

Rev

Rev 192 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
192 - 1
#
2
# This is the main Apache HTTP server configuration file.  It contains the
3
# configuration directives that give the server its instructions.
4
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
5
# In particular, see
6
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
7
# for a discussion of each configuration directive.
8
#
9
# See the httpd.conf(5) man page for more information on this configuration,
10
# and httpd.service(8) on using and configuring the httpd service.
11
#
12
# Do NOT simply read the instructions in here without understanding
13
# what they do.  They're here only as hints or reminders.  If you are unsure
14
# consult the online docs. You have been warned.
15
#
16
# Configuration and logfile names: If the filenames you specify for many
17
# of the server's control files begin with "/" (or "drive:/" for Win32), the
18
# server will use that explicit path.  If the filenames do *not* begin
19
# with "/", the value of ServerRoot is prepended -- so 'log/access_log'
20
# with ServerRoot set to '/www' will be interpreted by the
21
# server as '/www/log/access_log', where as '/log/access_log' will be
22
# interpreted as '/log/access_log'.
23
 
24
#
25
# ServerRoot: The top of the directory tree under which the server's
26
# configuration, error, and log files are kept.
27
#
28
# Do not add a slash at the end of the directory path.  If you point
29
# ServerRoot at a non-local disk, be sure to specify a local disk on the
30
# Mutex directive, if file-based mutexes are used.  If you wish to share the
31
# same ServerRoot for multiple httpd daemons, you will need to change at
32
# least PidFile.
33
#
34
ServerRoot "/etc/httpd"
35
 
36
#
37
# Listen: Allows you to bind Apache to specific IP addresses and/or
38
# ports, instead of the default. See also the <VirtualHost>
39
# directive.
40
#
41
# Change this to Listen on specific IP addresses as shown below to
42
# prevent Apache from glomming onto all bound IP addresses.
43
#
44
#Listen 12.34.56.78:80
45
Listen 10.192.25.241:80
46
 
47
#
48
# Dynamic Shared Object (DSO) Support
49
#
50
# To be able to use the functionality of a module which was built as a DSO you
51
# have to place corresponding `LoadModule' lines at this location so the
52
# directives contained in it are actually available _before_ they are used.
53
# Statically compiled modules (those listed by `httpd -l') do not need
54
# to be loaded here.
55
#
56
# Example:
57
# LoadModule foo_module modules/mod_foo.so
58
#
59
Include conf.modules.d/*.conf
60
 
61
#
62
# If you wish httpd to run as a different user or group, you must run
63
# httpd as root initially and it will switch.
64
#
65
# User/Group: The name (or #number) of the user/group to run httpd as.
66
# It is usually good practice to create a dedicated user and group for
67
# running httpd, as with most system services.
68
#
69
User apache
70
Group apache
71
 
72
# 'Main' server configuration
73
#
74
# The directives in this section set up the values used by the 'main'
75
# server, which responds to any requests that aren't handled by a
76
# <VirtualHost> definition.  These values also provide defaults for
77
# any <VirtualHost> containers you may define later in the file.
78
#
79
# All of these directives may appear inside <VirtualHost> containers,
80
# in which case these default settings will be overridden for the
81
# virtual host being defined.
82
#
83
 
84
#
85
# ServerAdmin: Your address, where problems with the server should be
86
# e-mailed.  This address appears on some server-generated pages, such
87
# as error documents.  e.g. admin@your-domain.com
88
#
89
ServerAdmin root@localhost
90
 
91
#
92
# ServerName gives the name and port that the server uses to identify itself.
93
# This can often be determined automatically, but we recommend you specify
94
# it explicitly to prevent problems during startup.
95
#
96
# If your host doesn't have a registered DNS name, enter its IP address here.
97
#
98
#ServerName www.example.com:80
99
 
100
#
101
# Deny access to the entirety of your server's filesystem. You must
102
# explicitly permit access to web content directories in other
103
# <Directory> blocks below.
104
#
105
<Directory />
106
    AllowOverride none
107
    Require all denied
108
</Directory>
109
 
110
#
111
# Note that from this point forward you must specifically allow
112
# particular features to be enabled - so if something's not working as
113
# you might expect, make sure that you have specifically enabled it
114
# below.
115
#
116
 
117
#
118
# DocumentRoot: The directory out of which you will serve your
119
# documents. By default, all requests are taken from this directory, but
120
# symbolic links and aliases may be used to point to other locations.
121
#
122
DocumentRoot "/var/www/html"
123
 
124
#
125
# Relax access to content within /var/www.
126
#
127
<Directory "/var/www">
128
    AllowOverride None
129
    # Allow open access:
130
    Require all granted
131
</Directory>
132
 
133
# Further relax access to the default document root:
134
<Directory "/var/www/html">
135
    #
136
    # Possible values for the Options directive are "None", "All",
137
    # or any combination of:
138
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
139
    #
140
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
141
    # doesn't give it to you.
142
    #
143
    # The Options directive is both complicated and important.  Please see
144
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
145
    # for more information.
146
    #
147
    Options Indexes FollowSymLinks
148
 
149
    #
150
    # AllowOverride controls what directives may be placed in .htaccess files.
151
    # It can be "All", "None", or any combination of the keywords:
152
    #   Options FileInfo AuthConfig Limit
153
    #
154
    AllowOverride None
155
 
156
    #
157
    # Controls who can get stuff from this server.
158
    #
159
    Require all granted
160
</Directory>
161
 
209 - 162
<Directory /var/www/html/wordpress>
163
    Options Indexes FollowSymLinks MultiViews
164
    AllowOverride All
165
    Order allow,deny
166
    allow from all
167
</Directory>
168
<Directory /var/www/html/wp>
169
    Options Indexes FollowSymLinks MultiViews
170
    AllowOverride All
171
    Order allow,deny
172
    allow from all
173
</Directory>
174
 
192 - 175
#
176
# DirectoryIndex: sets the file that Apache will serve if a directory
177
# is requested.
178
#
179
<IfModule dir_module>
180
    DirectoryIndex index.html
181
</IfModule>
182
 
183
#
184
# The following lines prevent .htaccess and .htpasswd files from being
185
# viewed by Web clients.
186
#
187
<Files ".ht*">
188
    Require all denied
189
</Files>
190
 
191
#
192
# ErrorLog: The location of the error log file.
193
# If you do not specify an ErrorLog directive within a <VirtualHost>
194
# container, error messages relating to that virtual host will be
195
# logged here.  If you *do* define an error logfile for a <VirtualHost>
196
# container, that host's errors will be logged there and not here.
197
#
198
ErrorLog "logs/error_log"
199
 
200
#
201
# LogLevel: Control the number of messages logged to the error_log.
202
# Possible values include: debug, info, notice, warn, error, crit,
203
# alert, emerg.
204
#
205
LogLevel warn
206
 
207
<IfModule log_config_module>
208
    #
209
    # The following directives define some format nicknames for use with
210
    # a CustomLog directive (see below).
211
    #
212
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
213
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
214
 
215
    <IfModule logio_module>
216
      # You need to enable mod_logio.c to use %I and %O
217
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
218
    </IfModule>
219
 
220
    #
221
    # The location and format of the access logfile (Common Logfile Format).
222
    # If you do not define any access logfiles within a <VirtualHost>
223
    # container, they will be logged here.  Contrariwise, if you *do*
224
    # define per-<VirtualHost> access logfiles, transactions will be
225
    # logged therein and *not* in this file.
226
    #
227
    #CustomLog "logs/access_log" common
228
 
229
    #
230
    # If you prefer a logfile with access, agent, and referer information
231
    # (Combined Logfile Format) you can use the following directive.
232
    #
233
    CustomLog "logs/access_log" combined
234
</IfModule>
235
 
236
<IfModule alias_module>
237
    #
238
    # Redirect: Allows you to tell clients about documents that used to
239
    # exist in your server's namespace, but do not anymore. The client
240
    # will make a new request for the document at its new location.
241
    # Example:
242
    # Redirect permanent /foo http://www.example.com/bar
243
 
244
    #
245
    # Alias: Maps web paths into filesystem paths and is used to
246
    # access content that does not live under the DocumentRoot.
247
    # Example:
248
    # Alias /webpath /full/filesystem/path
249
    #
250
    # If you include a trailing / on /webpath then the server will
251
    # require it to be present in the URL.  You will also likely
252
    # need to provide a <Directory> section to allow access to
253
    # the filesystem path.
254
 
255
    #
256
    # ScriptAlias: This controls which directories contain server scripts.
257
    # ScriptAliases are essentially the same as Aliases, except that
258
    # documents in the target directory are treated as applications and
259
    # run by the server when requested rather than as documents sent to the
260
    # client.  The same rules about trailing "/" apply to ScriptAlias
261
    # directives as to Alias.
262
    #
263
    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
264
 
265
</IfModule>
266
 
267
#
268
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
269
# CGI directory exists, if you have that configured.
270
#
271
<Directory "/var/www/cgi-bin">
272
    AllowOverride None
273
    Options None
274
    Require all granted
275
</Directory>
276
 
277
<IfModule mime_module>
278
    #
279
    # TypesConfig points to the file containing the list of mappings from
280
    # filename extension to MIME-type.
281
    #
282
    TypesConfig /etc/mime.types
283
 
284
    #
285
    # AddType allows you to add to or override the MIME configuration
286
    # file specified in TypesConfig for specific file types.
287
    #
288
    #AddType application/x-gzip .tgz
289
    #
290
    # AddEncoding allows you to have certain browsers uncompress
291
    # information on the fly. Note: Not all browsers support this.
292
    #
293
    #AddEncoding x-compress .Z
294
    #AddEncoding x-gzip .gz .tgz
295
    #
296
    # If the AddEncoding directives above are commented-out, then you
297
    # probably should define those extensions to indicate media types:
298
    #
299
    AddType application/x-compress .Z
300
    AddType application/x-gzip .gz .tgz
301
 
302
    #
303
    # AddHandler allows you to map certain file extensions to "handlers":
304
    # actions unrelated to filetype. These can be either built into the server
305
    # or added with the Action directive (see below)
306
    #
307
    # To use CGI scripts outside of ScriptAliased directories:
308
    # (You will also need to add "ExecCGI" to the "Options" directive.)
309
    #
310
    #AddHandler cgi-script .cgi
311
 
312
    # For type maps (negotiated resources):
313
    #AddHandler type-map var
314
 
315
    #
316
    # Filters allow you to process content before it is sent to the client.
317
    #
318
    # To parse .shtml files for server-side includes (SSI):
319
    # (You will also need to add "Includes" to the "Options" directive.)
320
    #
321
    AddType text/html .shtml
322
    AddOutputFilter INCLUDES .shtml
323
</IfModule>
324
 
325
#
326
# Specify a default charset for all content served; this enables
327
# interpretation of all content as UTF-8 by default.  To use the
328
# default browser choice (ISO-8859-1), or to allow the META tags
329
# in HTML content to override this choice, comment out this
330
# directive:
331
#
332
AddDefaultCharset UTF-8
333
 
334
<IfModule mime_magic_module>
335
    #
336
    # The mod_mime_magic module allows the server to use various hints from the
337
    # contents of the file itself to determine its type.  The MIMEMagicFile
338
    # directive tells the module where the hint definitions are located.
339
    #
340
    MIMEMagicFile conf/magic
341
</IfModule>
342
 
343
#
344
# Customizable error responses come in three flavors:
345
# 1) plain text 2) local redirects 3) external redirects
346
#
347
# Some examples:
348
#ErrorDocument 500 "The server made a boo boo."
349
#ErrorDocument 404 /missing.html
350
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
351
#ErrorDocument 402 http://www.example.com/subscription_info.html
352
#
353
 
354
#
355
# EnableMMAP and EnableSendfile: On systems that support it,
356
# memory-mapping or the sendfile syscall may be used to deliver
357
# files.  This usually improves server performance, but must
358
# be turned off when serving from networked-mounted
359
# filesystems or if support for these functions is otherwise
360
# broken on your system.
361
# Defaults if commented: EnableMMAP On, EnableSendfile Off
362
#
363
#EnableMMAP off
364
EnableSendfile on
365
 
366
# Supplemental configuration
367
#
368
# Load config files in the "/etc/httpd/conf.d" directory, if any.
369
IncludeOptional conf.d/*.conf
370
RequestHeader unset Proxy early