Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apache service module: allow compression #9407

Merged
merged 1 commit into from Aug 25, 2015

Conversation

wmertens
Copy link
Contributor

Adds enableCompression flag and sets up mod_deflate.

@wmertens
Copy link
Contributor Author

No complaints and low-impact and checks pass so merging.

wmertens added a commit that referenced this pull request Aug 25, 2015
Apache service module: allow compression
@wmertens wmertens merged commit 660cafe into NixOS:master Aug 25, 2015
@wmertens wmertens deleted the apache-deflate branch August 25, 2015 05:36
@edolstra
Copy link
Member

I'm 👎 on this because it's just too site-specific. It's a bunch of highly browser- and file type specific rules. That kind of site-specific policy really shouldn't be in a generic NixOS module.

@wmertens
Copy link
Contributor Author

Well, OTOH setting up compression is not trivial and this set of rules
seemed nice enough for general use.

It is optional, and you can always define your own rules.

Is there any rule in particular that you don't like or that should be
configurable?

On Tue, Aug 25, 2015, 10:33 Eelco Dolstra notifications@github.com wrote:

I'm [image: 👎] on this because it's just too site-specific. It's a
bunch of highly browser- and file type specific rules. That kind of
site-specific policy really shouldn't be in a generic NixOS module.


Reply to this email directly or view it on GitHub
#9407 (comment).

Wout.
(typed on mobile, excuse terseness)

edolstra added a commit that referenced this pull request Aug 28, 2015
This reverts commit 164f6ff per
#9407 (comment)
(it's too site-specific). Furthermore this should be an option at the
virtual host level.
edolstra added a commit that referenced this pull request Aug 28, 2015
This reverts commit 164f6ff per
#9407 (comment)
(it's too site-specific). Furthermore this should be an option at the
virtual host level.

(cherry picked from commit 9d82f7e)
@qknight
Copy link
Member

qknight commented Sep 12, 2015

@edolstra
i think that this global flag is a good thing. but anyway, if you want it to be vhost specific, we can't use Nix to configure it as there is no vhost abstraction yet, correct?

deflate per vhost config

this is how i enabled deflate:

    extraModules = [
      { name = "php5"; path = "${pkgs.php}/modules/libphp5.so"; }
      { name = "deflate"; path = "${pkgs.apacheHttpd}/modules/mod_deflate.so"; }
    ];

and

    virtualHosts =
    [
      {
        hostName = "example.com";
        enableSSL = false;
        extraConfig = ''
          ... many lines ...
          SetOutputFilter DEFLATE
        '';
       ...

in the extraConfig of the vhost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants