如何在Heroku上运行mod_deflate

时间:2014-02-16 20:20:59

标签: apache heroku

我们的应用程序是在Apache上运行的PHP。我正在尝试安装mod_deflate,但是我收到错误: httpd:/app/apache/conf/httpd.conf第433行的语法错误:/app/www/heroku/conf/default.conf第19行语法错误:无法加载/ app / www / heroku / ext / mod_deflate .so到服务器:/lib/libc.so.6:找不到版本`GLIBC_2.14'(/app/www/heroku/ext/mod_deflate.so要求)

有谁知道我需要做些什么才能让它发挥作用?

这是我的default.conf:

DocumentRoot "/app/www/public"

<Directory "/app/www/public">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

#
# Allow more concurrent connections per dyno
#
ServerLimit 12
MaxClients 12

#
# Enable compression with mod_deflate
#
LoadModule deflate_module /app/www/heroku/ext/mod_deflate.so
<IfModule mod_deflate.c>
    # Set compression level
    DeflateCompressionLevel 6

    # 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
    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>

0 个答案:

没有答案