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

Consider providing more comprehensive Apache examples #253

Closed
alrra opened this issue May 9, 2014 · 4 comments
Closed

Consider providing more comprehensive Apache examples #253

alrra opened this issue May 9, 2014 · 4 comments

Comments

@alrra
Copy link

alrra commented May 9, 2014

Maybe consider using the configs provided in the web performance section of the .htaccess file from the server-configs-apache repository?

e.g.: for compression there are many other file types that can be compressed, also one has to take into consideration the different versions of Apache, if mod_deflate is enabled, plus other things:

<IfModule mod_deflate.c>

    # 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/ld+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>

</IfModule>
@djalmaaraujo
Copy link
Collaborator

@alrra I will take a look on your considerations. thanks for your contribution

@djalmaaraujo
Copy link
Collaborator

Is it possible to you create a pull-request with your considerations?

@alrra
Copy link
Author

alrra commented May 12, 2014

Is it possible to you create a pull-request with your considerations?

@djalmaaraujo Sure, I will do it in the next few days as I'm kinda caught up with some stuff right now.

I apologize for not doing the Pull Request in the first place, but I wasn't sure if you guys were ok with the idea.

@zenorocha
Copy link
Owner

Same as #252

Although this improvement looks useful, I prefer to remove the Server section because people will start to send tips for other servers like nginx and so on (why Apache only?). Perhaps we should focus on front-end and keep these server tips to another guide.

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

No branches or pull requests

3 participants