My favorites | Sign in
Project Home Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions

Issue 131 attachment: post_virtualhost_global.conf (9.9 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
#---------
# Deflate
#---------

<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
DeflateCompressionLevel 6

<IfModule mod_setenvif.c>
# Netscape 4.x has some problems…
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won’t work. You can use the following
# workaround to get the desired effect:
#BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

# Don’t compress already-compressed files
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI .(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI .(?:avi|mov|mp3|mp4|rm|flv|swf|mp?g)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI .pdf$ no-gzip dont-vary
</IfModule>

#DeflateFilterNote Input instream
#DeflateFilterNote Output outstream
#DeflateFilterNote Ratio ratio
#LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
#CustomLog logs/deflate.log deflate

<IfModule mod_headers.c>
# Make sure proxies don’t deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>

#---------
# CACHE
#---------
#
# MCacheMaxObjectSize bytes
# MCacheSize KB
#
#LoadModule cache_module /usr/lib64/httpd/modules/mod_cache.so
#LoadModule mem_cache_module /usr/lib64/httpd/modules/mod_mem_cache.so
<IfModule mod_cache.c>
CacheDefaultExpire 3600
# <IfModule mod_mem_cache.c>
# CacheEnable mem /
# CacheEnable fd /
# MCacheSize 524288
# MCacheMaxObjectCount 5000
# MCacheMaxObjectSize 10485760
# MCacheMinObjectSize 1
# CacheMaxExpire 86400
# CacheDisable /php
# </IfModule>
<ifModule mod_disk_cache.c>
CacheEnable disk /
# CacheEnable fd /
CacheRoot /cache/apacheCache
CacheDirLevels 2
CacheDirLength 1
CacheMaxFileSize 10485760
CacheMinFileSize 1
CacheIgnoreCacheControl Off
CacheIgnoreNoLastMod On
CacheIgnoreQueryString Off
# CacheIgnoreHeaders None
# CacheIgnoreHeaders Set-Cookie
CacheLastModifiedFactor 0.1
CacheDefaultExpire 3600
CacheMaxExpire 86400
CacheStoreNoStore Off
CacheStorePrivate On
</ifModule>
</IfModule>

<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A0
# 1 Month
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$">
ExpiresDefault A2419200
</FilesMatch>

# 1 Week
<FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
ExpiresDefault A604800
Header unset Etag
Header set Cache-control "public, max-age=600"
</FilesMatch>
# ExpiresByType image/jpeg A604800
# ExpiresByType text/plain A604800

# 3 hours
<FilesMatch "\.(txt|xml)$">
ExpiresDefault A10800
#Header unset Etag
#Header set Cache-control "public, max-age=600"
</FilesMatch>
<FilesMatch "\.(js|css)$">
ExpiresDefault A10800
Header unset Etag
Header set Cache-control "public, max-age=600"
</FilesMatch>

# ExpiresByType application/x-javascript A10800
# ExpiresByType text/css A10800

# 0 sec
# Force no caching for dynamic files
<FilesMatch "\.(php|cgi|pl)$">
ExpiresDefault A0
Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0"
# deprecated header for http 1.0
# Header set Pragma "no-cache"
</FilesMatch>

<FilesMatch "\.(html|htm)$">
Header unset Etag
ExpiresDefault A0
Header set Cache-control "max-age=0, no-cache, no-store"
</FilesMatch>

</IfModule>

#----------------
# Google PageSpeed
#----------------
#LoadModule pagespeed_module /usr/lib64/httpd/modules/mod_pagespeed.so
LoadModule pagespeed_module /usr/local/httpd/modules/mod_pagespeed.so

<IfModule pagespeed_module>
# Turn on mod_pagespeed. To completely disable mod_pagespeed, you
# can set this to "off".
ModPagespeed on

# Direct Apache to send all HTML output to the mod_pagespeed
# output handler.
AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html

# The ModPagespeedFileCachePath and
# ModPagespeedGeneratedFilePrefix directories must exist and be
# writable by the apache user (as specified by the User
# directive).
ModPagespeedFileCachePath "/cache/mod_pagespeed/cache/"
ModPagespeedGeneratedFilePrefix "/cache/mod_pagespeed/files/"


# Override the mod_pagespeed 'rewrite level'. The default level
# "CoreFilters" uses a set of rewrite filters that are generally
# safe for most web pages. Most sites should not need to change
# this value and can instead fine-tune the configuration using the
# ModPagespeedDisableFilters and ModPagespeedEnableFilters
# directives, below. Valid values for ModPagespeedRewriteLevel are
# PassThrough and CoreFilters.
#
ModPagespeedRewriteLevel CoreFilters

# Explicitly disables specific filters. This is useful in
# conjuction with ModPagespeedRewriteLevel. For instance, if one
# of the filters in the CoreFilters needs to be disabled for a
# site, that filter can be added to
# ModPagespeedDisableFilters. This directive contains a
# comma-separated list of filter names, and can be repeated.
#
# ModPagespeedDisableFilters rewrite_javascript

# Explicitly enables specific filters. This is useful in
# conjuction with ModPagespeedRewriteLevel. For instance, filters
# not included in the CoreFilters may be enabled using this
# directive. This directive contains a comma-separated list of
# filter names, and can be repeated.
#
# ModPagespeedEnableFilters collapse_whitespace,elide_attributes

# ModPagespeedDomain
# authorizes rewriting of JS, CSS, and Image files found in this
# domain. By default only resources with the same origin as the
# HTML file are rewritten. For example:
#
# ModPagespeedDomain cdn.myhost.com
#
# This will allow resources found on http://cdn.myhost.com to be
# rewritten in addition to those in the same domain as the HTML.
#
# Wildcards (* and ?) are allowed in the domain specification. Be
# careful when using them as if you rewrite domains that do not
# send you traffic, then the site receiving the traffic will not
# know how to serve the rewritten content.

# Other defaults (cache sizes and thresholds):
ModPagespeedFileCacheSizeKb 102400
ModPagespeedFileCacheCleanIntervalMs 3600000
ModPagespeedLRUCacheKbPerProcess 1024
ModPagespeedLRUCacheByteLimit 16384
ModPagespeedCssInlineMaxBytes 2048
ModPagespeedImgInlineMaxBytes 2048
ModPagespeedJsInlineMaxBytes 2048
ModPagespeedCssOutlineMinBytes 3000
ModPagespeedJsOutlineMinBytes 3000

# Bound the number of images that can be rewritten at any one time; this
# avoids overloading the CPU. Set this to 0 to remove the bound.
ModPagespeedImgMaxRewritesAtOnce 0

# When Apache is set up as a browser proxy, mod_pagespeed can record
# web-sites as they are requested, so that an image of the web is built up
# in the directory of the proxy administrator's choosing. When ReadOnly is
# on, only files already present in the SlurpDirectory are served by the
# proxy.
# ModPagespeedSlurpDirectory ...
# ModPagespeedSlurpReadOnly on


# Enables server-side instrumentation and statistics. If this rewriter is
# enabled, then each rewritten HTML page will have instrumentation javacript
# added that sends latency beacons to /mod_pagespeed_beacon. These
# statistics can be accessed at /mod_pagespeed_statistics. You must also
# enable the mod_pagespeed_statistics and mod_pagespeed_beacon handlers
# below.
#
ModPagespeedEnableFilters add_instrumentation


# This handles the client-side instrumentation callbacks which are injected
# by the add_instrumentation filter.
# You can use a different location by adding the ModPagespeedBeaconUrl
# directive; see the documentation on add_instrumentation.
#
<Location /mod_pagespeed_beacon>
SetHandler mod_pagespeed_beacon
</Location>

# This page lets you view statistics about the mod_pagespeed module.
<Location /mod_pagespeed_statistics>
Order allow,deny
# You may insert other "Allow from" lines to add hosts you want to
# allow to look at generated statistics. Another possibility is
# to comment out the "Order" and "Allow" options from the config
# file, to allow any client that can reach your server to examine
# statistics. This might be appropriate in an experimental setup or
# if the Apache server is protected by a reverse proxy that will
# filter URLs in some fashion.
#Allow from localhost,x.x.x.x,x.x.x.x
Allow from localhost
Allow from 1xx.1xx.9x.1x
Allow from 5x.1xx.2xx.2xx

SetHandler mod_pagespeed_statistics
</Location>

ModPagespeedEnableFilters add_head
ModPagespeedEnableFilters collapse_whitespace
ModPagespeedEnableFilters combine_heads
ModPagespeedEnableFilters rewrite_images
ModPagespeedEnableFilters insert_img_dimensions
ModPagespeedEnableFilters inline_css
ModPagespeedEnableFilters outline_css
ModPagespeedEnableFilters combine_css
ModPagespeedEnableFilters move_css_to_head
ModPagespeedEnableFilters elide_attributes
ModPagespeedEnableFilters extend_cache
ModPagespeedEnableFilters inline_javascript
ModPagespeedEnableFilters outline_javascript
#ModPagespeedEnableFilters remove_comments
#ModPagespeedEnableFilters remove_quotes
ModPagespeedEnableFilters rewrite_css
##ModPagespeedEnableFilters rewrite_javascript
</IfModule>


Powered by Google Project Hosting