From d447f0334162226489d53272f851ad1d3af41bb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C4=83t=C4=83lin=20Mari=C8=99?= Date: Fri, 10 Aug 2018 13:49:07 -0700 Subject: [PATCH] Docs: Add full `web.config` example Fix #1100 --- packages/hint-content-type/README.md | 11 ++++++++--- .../hint-highest-available-document-mode/README.md | 12 +++++++++--- packages/hint-http-cache/README.md | 11 ++++++++--- packages/hint-http-compression/README.md | 11 ++++++++--- packages/hint-no-html-only-headers/README.md | 10 +++++++--- packages/hint-strict-transport-security/README.md | 11 ++++++++--- .../docs/user-guide/server-configurations/apache.md | 3 +++ .../docs/user-guide/server-configurations/index.md | 6 ++++-- 8 files changed, 55 insertions(+), 20 deletions(-) create mode 100644 packages/hint/docs/user-guide/server-configurations/apache.md diff --git a/packages/hint-content-type/README.md b/packages/hint-content-type/README.md index 1a3a18ddefe..0fc5c6267a2 100644 --- a/packages/hint-content-type/README.md +++ b/packages/hint-content-type/README.md @@ -266,6 +266,9 @@ Note that: common with hosting services), add the snippets in a `.htaccess` file in the root of the web site/app. +For the complete set of configurations, not just for this rule, see +the [Apache server configuration related documentation][apache config]. +
How to configure IIS @@ -379,8 +382,9 @@ Note that: * The above snippet works with IIS 7+. * You should use the above snippet in the `web.config` of your application. -* For the complete set of configurations, not just for this rule, see - [this IIS server configuration related docs][IIS config]. + +For the complete set of configurations, not just for this rule, +see the [IIS server configuration related documentation][iis config].
@@ -459,13 +463,13 @@ And then activate it via the [`.hintrc`][hintrc] configuration file: [required media type]: https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache#Referencing_a_cache_manifest_file [server configs]: https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Configuring_server_MIME_types [hintrc]: https://webhint.io/docs/user-guide/further-configuration/hintrc-formats/ -[IIS config]: https://webhint.io/docs/user-guide/server-configurations/iis/ [addcharset]: https://httpd.apache.org/docs/current/mod/mod_mime.html#addcharset [adddefaultcharset]: https://httpd.apache.org/docs/current/mod/core.html#adddefaultcharset [addtype]: https://httpd.apache.org/docs/current/mod/mod_mime.html#addtype +[apache config]: https://webhint.io/docs/user-guide/server-configurations/apache/ [apache directory]: https://httpd.apache.org/docs/current/mod/core.html#directory [how to enable apache modules]: https://github.com/h5bp/server-configs-apache/wiki/How-to-enable-Apache-modules [htaccess is slow]: https://httpd.apache.org/docs/current/howto/htaccess.html#when @@ -475,5 +479,6 @@ And then activate it via the [`.hintrc`][hintrc] configuration file: +[iis config]: https://webhint.io/docs/user-guide/server-configurations/iis/ [mime.types iis]: https://support.microsoft.com/en-us/help/936496/description-of-the-default-settings-for-the-mimemap-property-and-for-t [mimeMap]: https://docs.microsoft.com/en-us/iis/configuration/system.webserver/staticcontent/mimemap diff --git a/packages/hint-highest-available-document-mode/README.md b/packages/hint-highest-available-document-mode/README.md index 1dfdb9686ab..ba3de809604 100644 --- a/packages/hint-highest-available-document-mode/README.md +++ b/packages/hint-highest-available-document-mode/README.md @@ -280,6 +280,9 @@ Note that: common with hosting services), add the snippets in a `.htaccess` file in the root of the web site/app. +For the complete set of configurations, not just for this rule, see +the [Apache server configuration related documentation][apache config]. +
How to configure IIS @@ -335,8 +338,9 @@ Note that: * The above snippet works with IIS 7+. * You should use the above snippet in the `web.config` of your application. -* For the complete set of configurations, not just for this rule, see - [this IIS server configuration related docs][IIS config]. + +For the complete set of configurations, not just for this rule, +see the [IIS server configuration related documentation][iis config].
@@ -407,11 +411,11 @@ And then activate it via the [`.hintrc`][hintrc] configuration file: [doc modes]: https://msdn.microsoft.com/en-us/library/cc288325.aspx [hintrc]: https://webhint.io/docs/user-guide/further-configuration/hintrc-formats/ [ie complications]: https://hsivonen.fi/doctype/#ie8 -[IIS config]: https://webhint.io/docs/user-guide/server-configurations/iis/ [targeted browsers]: https://webhint.io/docs/user-guide/further-configuration/browser-context/ +[apache config]: https://webhint.io/docs/user-guide/server-configurations/apache/ [apache directory]: https://httpd.apache.org/docs/current/mod/core.html#directory [header directive]: https://httpd.apache.org/docs/current/mod/mod_headers.html#header [how to enable apache modules]: https://github.com/h5bp/server-configs-apache/wiki/How-to-enable-Apache-modules @@ -421,4 +425,6 @@ And then activate it via the [`.hintrc`][hintrc] configuration file: [mod_mime]: https://httpd.apache.org/docs/current/mod/mod_mime.html + +[iis config]: https://webhint.io/docs/user-guide/server-configurations/iis/ [url rewrite]: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-the-url-rewrite-module diff --git a/packages/hint-http-cache/README.md b/packages/hint-http-cache/README.md index aa818606d31..31965ef3767 100644 --- a/packages/hint-http-cache/README.md +++ b/packages/hint-http-cache/README.md @@ -288,6 +288,9 @@ Also note that: common with hosting services), add the snippets in a `.htaccess` file in the root of the web site/app. +For the complete set of configurations, not just for this rule, see +the [Apache server configuration related documentation][apache config]. +
How to configure IIS @@ -333,8 +336,9 @@ Important notes: * The above snippet works with IIS 7+. * You should use the above snippet in the `web.config` of your application. -* For the complete set of configurations, not just for this rule, see - [this IIS server configuration related docs][IIS config]. + +For the complete set of configurations, not just for this rule, +see the [IIS server configuration related documentation][iis config].
@@ -435,13 +439,13 @@ And then activate it via the [`.hintrc`][hintrc] configuration file: [google http caching]: https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching [hintrc]: https://webhint.io/docs/user-guide/further-configuration/hintrc-formats/ [how well you know the web]: https://youtu.be/vAgKZoGIvqs?t=12m20s -[IIS config]: https://webhint.io/docs/user-guide/server-configurations/iis/ [maxage0]: http://httparchive.org/about.php#maxage0 [maxage0 image]: https://chart.googleapis.com/chart?chd=t:-1%7C49,51,100,100,51,51,51,51,51,51,100,50,50,50,50,50,50,50,51,51,51,50,50,50&chxl=0:%7C+%7C12%2F16%7C+%7C1%2F17%7C+%7C2%2F17%7C+%7C3%2F17%7C+%7C4%2F17%7C+%7C5%2F17%7C+%7C6%2F17%7C+%7C7%2F17%7C+%7C8%2F17%7C+%7C9%2F17%7C+%7C10%2F17%7C+%7C11%2F17&chxt=x&chs=600x300&cht=lxy&chco=184852&chxs=0,676767,11.5,0,lt,676767&chxtc=0,8&chm=N**+%,184852,0,1::2,12,,h::8&chds=0,100,0,100&chts=184852,24&chtt=Cacheable+Resources&chls=2&chma=5,5,5,25 [revving files]: https://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/ +[apache config]: https://webhint.io/docs/user-guide/server-configurations/apache/ [apache directory]: https://httpd.apache.org/docs/current/mod/core.html#directory [expiresactive]: https://httpd.apache.org/docs/current/mod/mod_expires.html#expiresactive [expiresbytype]: https://httpd.apache.org/docs/current/mod/mod_expires.html#expiresbytype @@ -456,3 +460,4 @@ And then activate it via the [`.hintrc`][hintrc] configuration file: [clientcache iis]: https://docs.microsoft.com/en-us/iis/configuration/system.webserver/staticcontent/clientcache +[iis config]: https://webhint.io/docs/user-guide/server-configurations/iis/ diff --git a/packages/hint-http-compression/README.md b/packages/hint-http-compression/README.md index 2336d7b66ff..eb8d7354cff 100644 --- a/packages/hint-http-compression/README.md +++ b/packages/hint-http-compression/README.md @@ -790,6 +790,9 @@ Also note that: common with hosting services), add the snippets in a `.htaccess` file in the root of the web site/app. +For the complete set of configurations, not just for this rule, see +the [Apache server configuration related documentation][apache config]. +
How to configure IIS @@ -964,8 +967,9 @@ Note that: * The above snippet works with IIS 7+. * You should use the above snippet in the `web.config` of your application. -* For the complete set of configurations, not just for this rule, see - [this IIS server configuration related docs][IIS config]. + +For the complete set of configurations, not just for this rule, +see the [IIS server configuration related documentation][iis config].
@@ -1065,7 +1069,6 @@ And then activate it via the [`.hintrc`][hintrc] configuration file: [gzip is not enough]: https://www.youtube.com/watch?v=whGwm0Lky2s [gzip ratio]: https://www.youtube.com/watch?v=Mjab_aZsdxw&t=24s [hintrc]: https://webhint.io/docs/user-guide/further-configuration/hintrc-formats/ -[IIS config]: https://webhint.io/docs/user-guide/server-configurations/iis/ [unship sdch]: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/nQl0ORHy7sw [wdmsc]: https://whatdoesmysitecost.com/ [zopfli blog post]: https://developers.googleblog.com/2013/02/compress-data-more-densely-with-zopfli.html @@ -1074,6 +1077,7 @@ And then activate it via the [`.hintrc`][hintrc] configuration file: [addoutputfilterbytype]: https://httpd.apache.org/docs/2.4/mod/mod_filter.html#addoutputfilterbytype +[apache config]: https://webhint.io/docs/user-guide/server-configurations/apache/ [apache directory]: https://httpd.apache.org/docs/current/mod/core.html#directory [how to enable apache modules]: https://github.com/h5bp/server-configs-apache/wiki/How-to-enable-Apache-modules [htaccess is slow]: https://httpd.apache.org/docs/current/howto/htaccess.html#when @@ -1086,4 +1090,5 @@ And then activate it via the [`.hintrc`][hintrc] configuration file: +[iis config]: https://webhint.io/docs/user-guide/server-configurations/iis/ [urlcompression]: https://docs.microsoft.com/en-us/iis/configuration/system.webserver/urlcompression diff --git a/packages/hint-no-html-only-headers/README.md b/packages/hint-no-html-only-headers/README.md index dfa6a8047e1..0a5e8a14ee3 100644 --- a/packages/hint-no-html-only-headers/README.md +++ b/packages/hint-no-html-only-headers/README.md @@ -126,6 +126,8 @@ Note that: common with hosting services), add the snippets in a `.htaccess` file in the root of the web site/app. +For the complete set of configurations, not just for this rule, see +the [Apache server configuration related documentation][apache config].
How to configure IIS @@ -195,8 +197,9 @@ Note that: * The above snippet works with IIS 7+. * You should use the above snippet in the `web.config` of your application. -* For the complete set of configurations, not just for this rule, see - [this IIS server configuration related docs][IIS config]. + +For the complete set of configurations, not just for this rule, +see the [IIS server configuration related documentation][iis config].
@@ -260,14 +263,15 @@ And then activate it via the [`.hintrc`][hintrc] configuration file: +[apache config]: https://webhint.io/docs/user-guide/server-configurations/apache/ [apache directory]: https://httpd.apache.org/docs/current/mod/core.html#directory [hintrc]: https://webhint.io/docs/user-guide/further-configuration/hintrc-formats/ [how to enable apache modules]: https://github.com/h5bp/server-configs-apache/wiki/How-to-enable-Apache-modules [htaccess is slow]: https://httpd.apache.org/docs/current/howto/htaccess.html#when -[IIS config]: https://webhint.io/docs/user-guide/server-configurations/iis/ [main apache conf file]: https://httpd.apache.org/docs/current/configuring.html#main [mod_headers]: https://httpd.apache.org/docs/current/mod/mod_headers.html +[iis config]: https://webhint.io/docs/user-guide/server-configurations/iis/ [url rewrite]: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-the-url-rewrite-module diff --git a/packages/hint-strict-transport-security/README.md b/packages/hint-strict-transport-security/README.md index dd1bdf924b1..109ac410837 100644 --- a/packages/hint-strict-transport-security/README.md +++ b/packages/hint-strict-transport-security/README.md @@ -146,6 +146,9 @@ Note that: common with hosting services), add the snippets in a `.htaccess` file in the root of the web site/app. +For the complete set of configurations, not just for this rule, see +the [Apache server configuration related documentation][apache config]. +
How to configure IIS @@ -170,8 +173,9 @@ Note that: * The above snippet works with IIS 7+. * You should use the above snippet in the `web.config` of your application. -* For the complete set of configurations, not just for this rule, see - [this IIS server configuration related docs][IIS config]. + +For the complete set of configurations, not just for this rule, +see the [IIS server configuration related documentation][iis config].
@@ -259,7 +263,6 @@ And then activate it via the [`.hintrc`][hintrc] configuration file: [hsts cheat sheat]: https://www.owasp.org/index.php/HTTP_Strict_Transport_Security_Cheat_Sheet [hsts wiki]: https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security -[IIS config]: https://webhint.io/docs/user-guide/server-configurations/iis/ [pineapple]: https://www.troyhunt.com/the-beginners-guide-to-breaking-website/ [preload form]:https://hstspreload.org/ [preload list]:https://cs.chromium.org/codesearch/f/chromium/src/net/http/transport_security_state_static.json @@ -270,6 +273,7 @@ And then activate it via the [`.hintrc`][hintrc] configuration file: +[apache config]: https://webhint.io/docs/user-guide/server-configurations/apache/ [apache directory]: https://httpd.apache.org/docs/current/mod/core.html#directory [header directive]: https://httpd.apache.org/docs/current/mod/mod_headers.html#header [how to enable apache modules]: https://github.com/h5bp/server-configs-apache/wiki/How-to-enable-Apache-modules @@ -281,3 +285,4 @@ And then activate it via the [`.hintrc`][hintrc] configuration file: [customHeader]: https://docs.microsoft.com/en-us/iis/configuration/system.webserver/httpprotocol/customheaders/ +[iis config]: https://webhint.io/docs/user-guide/server-configurations/iis/ diff --git a/packages/hint/docs/user-guide/server-configurations/apache.md b/packages/hint/docs/user-guide/server-configurations/apache.md new file mode 100644 index 00000000000..990b840af2b --- /dev/null +++ b/packages/hint/docs/user-guide/server-configurations/apache.md @@ -0,0 +1,3 @@ +# Basic server configuration for Apache + +TODO diff --git a/packages/hint/docs/user-guide/server-configurations/index.md b/packages/hint/docs/user-guide/server-configurations/index.md index eaffd3c5041..2d431f9929e 100644 --- a/packages/hint/docs/user-guide/server-configurations/index.md +++ b/packages/hint/docs/user-guide/server-configurations/index.md @@ -6,8 +6,10 @@ technologies, they only contain the relevant portions. The following are examples of basic server configurations to help you get started: -* [IIS][IIS config] +* [Apache][apache config] +* [IIS][iis config] -[IIS config]: ./iis.md +[apache config]: ./apache.md +[iis config]: ./iis.md