Guest User

Untitled

a guest
Jun 24th, 2015
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.93 KB | None | 0 0
  1. <IfModule pagespeed_module>
  2. # Turn on mod_pagespeed. To completely disable mod_pagespeed, you
  3. # can set this to "off".
  4. ModPagespeed on
  5.  
  6. # We want VHosts to inherit global configuration.
  7. # If this is not included, they'll be independent (except for inherently
  8. # global options), at least for backwards compatibility.
  9. ModPagespeedInheritVHostConfig on
  10.  
  11. # Direct Apache to send all HTML output to the mod_pagespeed
  12. # output handler.
  13. AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
  14.  
  15. # If you want mod_pagespeed process XHTML as well, please uncomment this
  16. # line.
  17. # AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER application/xhtml+xml
  18.  
  19. # The ModPagespeedFileCachePath directory must exist and be writable
  20. # by the apache user (as specified by the User directive).
  21. ModPagespeedFileCachePath "/var/cache/mod_pagespeed/"
  22.  
  23. # LogDir is needed to store various logs, including the statistics log
  24. # required for the console.
  25. ModPagespeedLogDir "/var/log/pagespeed"
  26.  
  27. # The locations of SSL Certificates is distribution-dependent.
  28. ModPagespeedSslCertDirectory "/etc/ssl/certs"
  29.  
  30.  
  31. # If you want, you can use one or more memcached servers as the store for
  32. # the mod_pagespeed cache.
  33. # ModPagespeedMemcachedServers localhost:11211
  34.  
  35. # A portion of the cache can be kept in memory only, to reduce load on disk
  36. # (or memcached) from many small files.
  37. # ModPagespeedCreateSharedMemoryMetadataCache "/var/cache/mod_pagespeed/" 51200
  38.  
  39. # Override the mod_pagespeed 'rewrite level'. The default level
  40. # "CoreFilters" uses a set of rewrite filters that are generally
  41. # safe for most web pages. Most sites should not need to change
  42. # this value and can instead fine-tune the configuration using the
  43. # ModPagespeedDisableFilters and ModPagespeedEnableFilters
  44. # directives, below. Valid values for ModPagespeedRewriteLevel are
  45. # PassThrough, CoreFilters and TestingCoreFilters.
  46. #
  47. ModPagespeedRewriteLevel PassThrough
  48.  
  49. # enabled
  50. ModPagespeedEnableFilters rewrite_images
  51. ModPagespeedEnableFilters inline_import_to_link
  52. ModPagespeedEnableFilters outline_css
  53. ModPagespeedCssOutlineMinBytes 3000
  54. ModPagespeedEnableFilters outline_javascript
  55. ModPagespeedJsOutlineMinBytes 1000
  56. ModPagespeedEnableFilters combine_css
  57. ModPagespeedEnableFilters rewrite_css
  58. ModPagespeedEnableFilters fallback_rewrite_css_urls
  59. ModPagespeedEnableFilters rewrite_style_attributes
  60. ModPagespeedEnableFilters flatten_css_imports
  61. ModPagespeedEnableFilters make_google_analytics_async
  62. ModPagespeedEnableFilters rewrite_javascript
  63. ModPagespeedEnableFilters include_js_source_maps
  64. ModPagespeedEnableFilters combine_javascript
  65. ModPagespeedMaxCombinedJsBytes 1048576
  66. ModPagespeedEnableFilters canonicalize_javascript_libraries
  67. ModPagespeedEnableFilters inline_css
  68. ModPagespeedEnableFilters inline_google_font_css
  69. ModPagespeedFetchHttps enable
  70. ModPagespeedEnableFilters inline_javascript
  71. ModPagespeedEnableFilters local_storage_cache
  72. ModPagespeedEnableFilters rewrite_images
  73. ModPagespeedEnableFilters convert_to_webp_lossless
  74. ModPagespeedEnableFilters resize_rendered_image_dimensions
  75. ModPagespeedEnableFilters remove_comments
  76. ModPagespeedEnableFilters elide_attributes
  77. ModPagespeedEnableFilters extend_cache
  78. ModPagespeedEnableFilters sprite_images
  79. ModPagespeedEnableFilters remove_quotes
  80. ModPagespeedEnableFilters insert_dns_prefetch
  81. ModPagespeedEnableFilters in_place_optimize_for_browser
  82. ModPagespeedInPlaceResourceOptimization on
  83. ModPagespeedFetchWithGzip on
  84. SetOutputFilter DEFLATE
  85. ModPagespeedEnableFilters lazyload_images
  86. ModPagespeedForceCaching on
  87. ModPagespeedMemcachedServers "127.0.0.1:11211"
  88. ModPagespeedEnableFilters convert_jpeg_to_progressive
  89. ModPagespeedEnableFilters convert_png_to_jpeg
  90. ModPagespeedEnableFilters recompress_webp
  91. ModPagespeedEnableFilters strip_image_color_profile
  92. ModPagespeedEnableFilters strip_image_meta_data
  93. ModPagespeedEnableFilters convert_jpeg_to_webp
  94. ModPagespeedNoTransformOptimizedImages on
  95. ModPagespeedImageInlineMaxBytes 4096
  96. ModPagespeedCssImageInlineMaxBytes 8192
  97. ModPagespeedLoadFromFile "https://demofleet.skoda-auto.pl" \
  98. "/var/www/vhosts/vps-1020396-5599.homecloud.pl/httpdocs/web"
  99.  
  100. # Explicitly disables specific filters. This is useful in
  101. # conjuction with ModPagespeedRewriteLevel. For instance, if one
  102. # of the filters in the CoreFilters needs to be disabled for a
  103. # site, that filter can be added to
  104. # ModPagespeedDisableFilters. This directive contains a
  105. # comma-separated list of filter names, and can be repeated.
  106. #
  107. # ModPagespeedDisableFilters rewrite_images
  108.  
  109. # Explicitly enables specific filters. This is useful in
  110. # conjuction with ModPagespeedRewriteLevel. For instance, filters
  111. # not included in the CoreFilters may be enabled using this
  112. # directive. This directive contains a comma-separated list of
  113. # filter names, and can be repeated.
  114. #
  115. # ModPagespeedEnableFilters rewrite_javascript,rewrite_css
  116. # ModPagespeedEnableFilters collapse_whitespace,elide_attributes
  117.  
  118. # Explicitly forbids the enabling of specific filters using either query
  119. # parameters or request headers. This is useful, for example, when we do
  120. # not want the filter to run for performance or security reasons. This
  121. # directive contains a comma-separated list of filter names, and can be
  122. # repeated.
  123. #
  124. # ModPagespeedForbidFilters rewrite_images
  125.  
  126. # How long mod_pagespeed will wait to return an optimized resource
  127. # (per flush window) on first request before giving up and returning the
  128. # original (unoptimized) resource. After this deadline is exceeded the
  129. # original resource is returned and the optimization is pushed to the
  130. # background to be completed for future requests. Increasing this value will
  131. # increase page latency, but might reduce load time (for instance on a
  132. # bandwidth-constrained link where it's worth waiting for image
  133. # compression to complete). If the value is less than or equal to zero
  134. # mod_pagespeed will wait indefinitely for the rewrite to complete before
  135. # returning.
  136. #
  137. # ModPagespeedRewriteDeadlinePerFlushMs 10
  138.  
  139. # ModPagespeedDomain
  140. # authorizes rewriting of JS, CSS, and Image files found in this
  141. # domain. By default only resources with the same origin as the
  142. # HTML file are rewritten. For example:
  143. #
  144. # ModPagespeedDomain cdn.myhost.com
  145. #
  146. # This will allow resources found on http://cdn.myhost.com to be
  147. # rewritten in addition to those in the same domain as the HTML.
  148. #
  149. # Other domain-related directives (like ModPagespeedMapRewriteDomain
  150. # and ModPagespeedMapOriginDomain) can also authorize domains.
  151. #
  152. # Wildcards (* and ?) are allowed in the domain specification. Be
  153. # careful when using them as if you rewrite domains that do not
  154. # send you traffic, then the site receiving the traffic will not
  155. # know how to serve the rewritten content.
  156.  
  157. # If you use downstream caches such as varnish or proxy_cache for caching
  158. # HTML, you can configure pagespeed to work with these caches correctly
  159. # using the following directives. Note that the values for
  160. # ModPagespeedDownstreamCachePurgeLocationPrefix and
  161. # ModPagespeedDownstreamCacheRebeaconingKey are deliberately left empty here
  162. # in order to force the webmaster to choose appropriate value for these.
  163. #
  164. # ModPagespeedDownstreamCachePurgeLocationPrefix
  165. # ModPagespeedDownstreamCachePurgeMethod PURGE
  166. # ModPagespeedDownstreamCacheRewrittenPercentageThreshold 95
  167. # ModPagespeedDownstreamCacheRebeaconingKey
  168.  
  169. # Other defaults (cache sizes and thresholds):
  170. #
  171. # ModPagespeedFileCacheSizeKb 102400
  172. # ModPagespeedFileCacheCleanIntervalMs 3600000
  173. # ModPagespeedLRUCacheKbPerProcess 1024
  174. # ModPagespeedLRUCacheByteLimit 16384
  175. # ModPagespeedCssFlattenMaxBytes 102400
  176. # ModPagespeedCssInlineMaxBytes 2048
  177. # ModPagespeedCssImageInlineMaxBytes 0
  178. # ModPagespeedImageInlineMaxBytes 3072
  179. # ModPagespeedJsInlineMaxBytes 2048
  180. # ModPagespeedCssOutlineMinBytes 3000
  181. # ModPagespeedJsOutlineMinBytes 3000
  182. # ModPagespeedMaxCombinedCssBytes -1
  183. # ModPagespeedMaxCombinedJsBytes 92160
  184.  
  185. # Limit the number of inodes in the file cache. Set to 0 for no limit.
  186. # The default value if this paramater is not specified is 0 (no limit).
  187. ModPagespeedFileCacheInodeLimit 500000
  188.  
  189. # Bound the number of images that can be rewritten at any one time; this
  190. # avoids overloading the CPU. Set this to 0 to remove the bound.
  191. #
  192. # ModPagespeedImageMaxRewritesAtOnce 8
  193.  
  194. # You can also customize the number of threads per Apache process
  195. # mod_pagespeed will use to do resource optimization. Plain
  196. # "rewrite threads" are used to do short, latency-sensitive work,
  197. # while "expensive rewrite threads" are used for actual optimization
  198. # work that's more computationally expensive. If you live these unset,
  199. # or use values <= 0 the defaults will be used, which is 1 for both
  200. # values when using non-threaded MPMs (e.g. prefork) and 4 for both
  201. # on threaded MPMs (e.g. worker and event). These settings can only
  202. # be changed globally, and not per virtual host.
  203. #
  204. # ModPagespeedNumRewriteThreads 4
  205. # ModPagespeedNumExpensiveRewriteThreads 4
  206.  
  207. # Randomly drop rewrites (*) to increase the chance of optimizing
  208. # frequently fetched resources and decrease the chance of optimizing
  209. # infrequently fetched resources. This can reduce CPU load. The default
  210. # value of this parameter is 0 (no drops). 90 means that a resourced
  211. # fetched once has a 10% probability of being optimized while a resource
  212. # that is fetched 50 times has a 99.65% probability of being optimized.
  213. #
  214. # (*) Currently only CSS files and images are randomly dropped. Images
  215. # within CSS files are not randomly dropped.
  216. #
  217. # ModPagespeedRewriteRandomDropPercentage 90
  218.  
  219. # Many filters modify the URLs of resources in HTML files. This is typically
  220. # harmless but pages whose Javascript expects to read or modify the original
  221. # URLs may break. The following parameters prevent filters from modifying
  222. # URLs of their respective types.
  223. #
  224. # ModPagespeedJsPreserveURLs on
  225. # ModPagespeedImagePreserveURLs on
  226. # ModPagespeedCssPreserveURLs on
  227.  
  228. # When PreserveURLs is on, it is still possible to enable browser-specific
  229. # optimizations (for example, webp images can be served to browsers that
  230. # will accept them). They'll be served with Vary: Accept or Vary:
  231. # User-Agent headers as appropriate. Note that this may require configuring
  232. # reverse proxy caches such as varnish to handle these headers properly.
  233. #
  234. # ModPagespeedFilters in_place_optimize_for_browser
  235.  
  236. # Internet Explorer has difficulty caching resources with Vary: headers.
  237. # They will either be uncached (older IE) or require revalidation. See:
  238. # http://blogs.msdn.com/b/ieinternals/archive/2009/06/17/vary-header-prevents-caching-in-ie.aspx
  239. # As a result we serve them as Cache-Control: private instead by default.
  240. # If you are using a reverse proxy or CDN configured to cache content with
  241. # the Vary: Accept header you should turn this setting off.
  242. #
  243. # ModPagespeedPrivateNotVaryForIE on
  244.  
  245. # Settings for image optimization:
  246. #
  247. # Lossy image recompression quality (0 to 100, -1 just strips metadata):
  248. # ModPagespeedImageRecompressionQuality 85
  249. #
  250. # Jpeg recompression quality (0 to 100, -1 uses ImageRecompressionQuality):
  251. # ModPagespeedJpegRecompressionQuality -1
  252. # ModPagespeedJpegRecompressionQualityForSmallScreens 70
  253. #
  254. # WebP recompression quality (0 to 100, -1 uses ImageRecompressionQuality):
  255. # ModPagespeedWebpRecompressionQuality 80
  256. # ModPagespeedWebpRecompressionQualityForSmallScreens 70
  257. #
  258. # Timeout for conversions to WebP format, in
  259. # milliseconds. Negative values mean no timeout is applied. The
  260. # default value is -1:
  261. # ModPagespeedWebpTimeoutMs 5000
  262. #
  263. # Percent of original image size below which optimized images are retained:
  264. # ModPagespeedImageLimitOptimizedPercent 100
  265. #
  266. # Percent of original image area below which image resizing will be
  267. # attempted:
  268. # ModPagespeedImageLimitResizeAreaPercent 100
  269.  
  270. # Settings for inline preview images
  271. #
  272. # Setting this to n restricts preview images to the first n images found on
  273. # the page. The default of -1 means preview images can appear anywhere on
  274. # the page (if those images appear above the fold).
  275. # ModPagespeedMaxInlinedPreviewImagesIndex -1
  276.  
  277. # Sets the minimum size in bytes of any image for which a low quality image
  278. # is generated.
  279. # ModPagespeedMinImageSizeLowResolutionBytes 3072
  280.  
  281. # The maximum URL size is generally limited to about 2k characters
  282. # due to IE: See http://support.microsoft.com/kb/208427/EN-US.
  283. # Apache servers by default impose a further limitation of about
  284. # 250 characters per URL segment (text between slashes).
  285. # mod_pagespeed circumvents this limitation, but if you employ
  286. # proxy servers in your path you may need to re-impose it by
  287. # overriding the setting here. The default setting is 1024
  288. # characters.
  289. #
  290. # ModPagespeedMaxSegmentLength 250
  291.  
  292. # Uncomment this if you want to prevent mod_pagespeed from combining files
  293. # (e.g. CSS files) across paths
  294. #
  295. # ModPagespeedCombineAcrossPaths off
  296.  
  297. # Renaming JavaScript URLs can sometimes break them. With this
  298. # option enabled, mod_pagespeed uses a simple heuristic to decide
  299. # not to rename JavaScript that it thinks is introspective.
  300. #
  301. # You can uncomment this to let mod_pagespeed rename all JS files.
  302. #
  303. # ModPagespeedAvoidRenamingIntrospectiveJavascript off
  304.  
  305. # Certain common JavaScript libraries are available from Google, which acts
  306. # as a CDN and allows you to benefit from browser caching if a new visitor
  307. # to your site previously visited another site that makes use of the same
  308. # libraries as you do. Enable the following filter to turn on this feature.
  309. #
  310. # ModPagespeedEnableFilters canonicalize_javascript_libraries
  311.  
  312. # The following line configures a library that is recognized by
  313. # canonicalize_javascript_libraries. This will have no effect unless you
  314. # enable this filter (generally by uncommenting the last line in the
  315. # previous stanza). The format is:
  316. # ModPagespeedLibrary bytes md5 canonical_url
  317. # Where bytes and md5 are with respect to the *minified* JS; use
  318. # js_minify --print_size_and_hash to obtain this data.
  319. # Note that we can register multiple hashes for the same canonical url;
  320. # we do this if there are versions available that have already been minified
  321. # with more sophisticated tools.
  322. #
  323. # Additional library configuration can be found in
  324. # pagespeed_libraries.conf included in the distribution. You should add
  325. # new entries here, though, so that file can be automatically upgraded.
  326. # ModPagespeedLibrary 43 1o978_K0_LNE5_ystNklf http://www.modpagespeed.com/rewrite_javascript.js
  327.  
  328. # Explicitly tell mod_pagespeed to load some resources from disk.
  329. # This will speed up load time and update frequency.
  330. #
  331. # This should only be used for static resources which do not need
  332. # specific headers set or other processing by Apache.
  333. #
  334. # Both URL and filesystem path should specify directories and
  335. # filesystem path must be absolute (for now).
  336. #
  337. # ModPagespeedLoadFromFile "http://example.com/static/" "/var/www/static/"
  338.  
  339.  
  340. # Enables server-side instrumentation and statistics. If this rewriter is
  341. # enabled, then each rewritten HTML page will have instrumentation javacript
  342. # added that sends latency beacons to /mod_pagespeed_beacon. These
  343. # statistics can be accessed at /mod_pagespeed_statistics. You must also
  344. # enable the mod_pagespeed_statistics and mod_pagespeed_beacon handlers
  345. # below.
  346. #
  347. # ModPagespeedEnableFilters add_instrumentation
  348.  
  349. # The add_instrumentation filter sends a beacon after the page onload
  350. # handler is called. The user might navigate to a new URL before this. If
  351. # you enable the following directive, the beacon is sent as part of an
  352. # onbeforeunload handler, for pages where navigation happens before the
  353. # onload event.
  354. #
  355. # ModPagespeedReportUnloadTime on
  356.  
  357. ModPagespeedDisableRewriteOnNoTransform off
  358.  
  359. # Uncomment the following line so that ModPagespeed will not cache or
  360. # rewrite resources with Vary: in the header, e.g. Vary: User-Agent.
  361. # Note that ModPagespeed always respects Vary: headers on html content.
  362. ModPagespeedRespectVary on
  363.  
  364. # Uncomment the following line if you want to disable statistics entirely.
  365. #
  366. # ModPagespeedStatistics off
  367.  
  368. # These handlers are central entry-points into the admin pages.
  369. # By default, pagespeed_admin and pagespeed_global_admin present
  370. # the same data, and differ only when
  371. # ModPagespeedUsePerVHostStatistics is enabled. In that case,
  372. # /pagespeed_global_admin sees aggregated data across all vhosts,
  373. # and the /pagespeed_admin sees data only for a particular vhost.
  374. #
  375. # You may insert other "Allow from" lines to add hosts you want to
  376. # allow to look at generated statistics. Another possibility is
  377. # to comment out the "Order" and "Allow" options from the config
  378. # file, to allow any client that can reach your server to access
  379. # and change server state, such as statistics, caches, and
  380. # messages. This might be appropriate in an experimental setup.
  381. <Location /pagespeed_admin>
  382. Order allow,deny
  383. Allow from localhost
  384. Allow from 127.0.0.1
  385. SetHandler pagespeed_admin
  386. </Location>
  387. <Location /pagespeed_global_admin>
  388. Order allow,deny
  389. Allow from localhost
  390. Allow from 127.0.0.1
  391. SetHandler pagespeed_global_admin
  392. </Location>
  393.  
  394. # Enable logging of mod_pagespeed statistics, needed for the console.
  395. ModPagespeedStatisticsLogging on
  396.  
  397. # Page /mod_pagespeed_message lets you view the latest messages from
  398. # mod_pagespeed, regardless of log-level in your httpd.conf
  399. # ModPagespeedMessageBufferSize is the maximum number of bytes you would
  400. # like to dump to your /mod_pagespeed_message page at one time,
  401. # its default value is 100k bytes.
  402. # Set it to 0 if you want to disable this feature.
  403. ModPagespeedMessageBufferSize 100000
  404. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment