脚本宝典收集整理的这篇文章主要介绍了如何在heroku上的PHP应用程序中启用压缩?,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
heroku config:set BUILDPACK_URL=https://gIThub.COM/heroku/heroku-buildpack-PHP
但那似乎没有做任何事情.我对Heroku很新,所以有人有什么建议吗?
# Force comPression for mangled headers. # http://develoPEr.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping <IfModule mod_setenvif.c> <IfModule mod_headers.c> SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$HAVE_Accept-Encoding RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding </IfModule> </IfModule> # ComPRess all output labeled with one of the following MIME-types # (for apache versions below 2.3.7,you don't need to enable `mod_filter` # and can remove the `<IfModule mod_filter.c>` and `</IfModule>` lines # as `AddOutputFilterByType` is still in the core directives). <IfModule mod_filter.c> AddOutputFilterByType DEFLATE application/atom+XMl \ application/javascript \ application/JSON \ application/RSS+xml \ application/vnd.ms-fontobject \ application/x-font-ttf \ application/x-web-app-manifest+json \ application/xhtml+xml \ application/xml \ font/opentype \ image/svg+xml \ image/x-icon \ text/css \ text/html \ text/plain \ text/x-component \ text/xml </IfModule>
heroku config:set BUILDPACK_URL=http://github.com/iphoting/heroku-buildpack-PHP-tyler
以上是脚本宝典为你收集整理的如何在heroku上的PHP应用程序中启用压缩?全部内容,希望文章能够帮你解决如何在heroku上的PHP应用程序中启用压缩?所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。