Opened 6 years ago
Closed 5 years ago
Last modified 5 years ago
#13366 closed Patch - Feature (fixed)
Mythweb - Safely implement recommended best practices
Reported by: | Gary Buhrmaster | Owned by: | Stuart Auchterlonie |
---|---|---|---|
Priority: | minor | Milestone: | 31.0 |
Component: | Plugin - MythWeb | Version: | Master Head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
Reviewing some old stashes, I found this one. It may be of interest to the mythweb users. It tries to implement the recommended configurations using safe definitions in the default apache config. Caveat emptor.
diff --git a/mythweb.conf.apache b/mythweb.conf.apache index cc81c3ff..c5da6061 100644 --- a/mythweb.conf.apache +++ b/mythweb.conf.apache @@ -212,6 +212,16 @@ # AddOutputFilterByType DEFLATE text/css # AddOutputFilterByType DEFLATE application/x-javascript + # if we can auto-detect the deflate module, use it + <IfModule deflate_module> + BrowserMatch ^Mozilla/4 gzip-only-text/html + BrowserMatch ^Mozilla/4\.0[678] no-gzip + BrowserMatch \bMSIE !no-gzip !gzip-only-text/html + AddOutputFilterByType DEFLATE text/html + AddOutputFilterByType DEFLATE text/css + AddOutputFilterByType DEFLATE application/x-javascript + </IfModule> + # This is helpful for mod_deflate -- it prevents proxies from changing # the user agent to/from this server, which can prevent compression from # being enabled. It is disabled here because many distros seem not to @@ -219,6 +229,11 @@ # # Header append Vary User-Agent env=!dont-vary + # If we can auto-detect the headers module, use it + <IfModule headers_module> + Header append Vary User-Agent env=!dont-vary + </IfModule> + # Set up the perl handler so we can stream properly. Do not use mod_perl # because it has a tendency to hold onto child processes, which causes # problems if the browser closes on an in-progress stream.
Change History (2)
Note: See
TracTickets for help on using
tickets.
In 37bf52585/mythweb: