-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Improve server configs #112
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
Conversation
|
Note: this PR is based on https://github.com/h5bp/server-configs-apache/blob/master/dist/.htaccess. On servers that I manage, I use that as a global configuration file ( Perhaps you could consider doing the same for the WHATWG servers? They’re really sensible defaults, and it would simplify the current |
|
I added |
|
We probably want to not dictate encoding decisions so we should keep those. However, could we just add |
@annevk Related commit removed. Compression now works ✨ curl -sSLI -H 'Accept-Encoding: gzip, deflate' https://html.spec.whatwg.org
HTTP/1.1 200 OK
Date: Sun, 06 Sep 2015 15:10:31 GMT
Server: Apache
Last-Modified: Sun, 06 Sep 2015 00:57:01 GMT
ETag: "7ccae8-51f099c4cd140"
Accept-Ranges: bytes
Vary: Accept-Encoding
-----> Content-Encoding: gzip
Access-Control-Allow-Origin: *
Strict-Transport-Security: max-age=31415926; includeSubDomains
Content-Type: text/html; charset=utf-8
@annevk, @mathiasbynens Maybe there should be a repository with those configs?
Done.
Comments removed. Let me know if I need to change anything else, and thanks for reviewing! |
Yeah I think that might be useful. They're also spread around a bit as the subdomains are divided to some extent per user. Any ideas for what we should call this and how to organize it? There's also some scripts on the server that take care of synchronization with the repositories we might want to host somewhere so folks can suggest improvements. |
.htaccess
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this needs moving.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@annevk Done.
|
Could you also squash the commits? Or I can do it while merging. Doesn't seem worth the two tweets it'll generate. |
* Fix indentation. * Add configurations to make Apache serve certain file types with the media type `charset` parameter set to `UTF-8`. * For consistency, use `Files` instead of `files`. (See also: http://httpd.apache.org/docs/current/mod/core.html#files) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Ref: #112
@annevk Done. |
Changes:
Add server configurations to the
.htaccessfile that make Apache serve certain resources compressed.Right now, nothing served from https://html.spec.whatwg.org/ is compressed, e.g.:
In the case of the
sourcefile (https://html.spec.whatwg.org/), the saving will be as follows:mod_deflateneeds to be enabled for this to take effect.<IfModule ... >checks are there to ensure that Apache won't try to run the enclosed configs if the required modules are not enabled.Add server configurations to the
.htaccessfile that make Apache serve certain file types with the media typecharsetparameter set toUTF-8.mod_mimeneeds to be enabled for this to take effect.Make minor consistency improvements in
.htaccess, namely:Filesinstead offiles.Note: I had a quick chat with @annevk, and he told me that the Apache version used is:
2.2.22-14.If I need to change anything, let me know. :)