Skip to content

Commit

Permalink
Fix info, note, etc. content to build with variable substitution
Browse files Browse the repository at this point in the history
  • Loading branch information
lesserwhirls committed Jan 17, 2025
1 parent 0c73e06 commit 0fdbfee
Show file tree
Hide file tree
Showing 26 changed files with 114 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,10 @@ The following example shows how to implement a proxy using the Apache HTTPD serv
protocol="AJP/1.3" />
~~~
{% include info.html content="
{% capture ajp_connector %}
Consult the Tomcat documentation for more information about the [AJP Connector](https://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/config/ajp.html){:target='_blank'} configuration options.
" %}
{% endcapture %}
{% include info.html content=ajp_connector %}
2. Disable any active `Java HTTP/1.1 Connector` and the `SSL HTTP/1.1 Connector` Tomcat connectors.
Expand Down
6 changes: 3 additions & 3 deletions docs/adminguide/src/site/pages/reference/TomcatManagerApp.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ This will be done in the following 2 steps:
<Context privileged="true" antiResourceLocking="false" docBase="${catalina.home}/webapps/manager"/>
~~~

{%include note.html content="
{% capture context_config %}
For more information about web application context configuration files and their security options, please review the [Tomcat Manager App How-To](http://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/manager-howto.html#Introduction){:target='_blank'} documentation.
" %}

{% endcapture %}
{% include info.html content=context_config %}

#### II. Modify `tomcat-users.xml`

Expand Down
7 changes: 4 additions & 3 deletions docs/adminguide/src/site/pages/securing/DigestedPasswords.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ A Tomcat Realm represents a "database" of usernames, passwords, and roles assign
supersecretpassword:bb7a2b6cf8da7122125c663fc1585808170b2027677195e0ad121f87b27320ae$1$55003acb56e907b19d29d3b4211dc98c837354690bc90579742d6747efeec4ea
~~~

{% include note.html content="
To use a different algorithm, a salt, or to limit the length of the resulting password hash, consult the [syntax options](https://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/realm-howto.html#Digested_Passwords){:target='_blank'} for the `tomcat_home/bin/digest.[bat|sh]` script.
" %}
{% capture algo %}
To use a different algorithm, a salt, or to limit the length of the resulting password hash, consult the [syntax options](https://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/realm-howto.html#Digested_Passwords){:target='_blank'} for the `tomcat_home/bin/digest.[bat|sh]` script.
{% endcapture %}
{% include info.html content=algo %}

3. Update `${tomcat_home}/conf/tomcat-users.xml` to replace your clear-text password with the encrypted version:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,10 @@ The `RemoteHostValve` compares the client hostname against one or more regular e
deny=".*\.bandwidthhogs\.com" />
~~~

{% capture remote_host_valve %}
Consult the Tomcat [Remote Host Valve](https://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/config/valve.html#Remote_Host_Valve){:target='_blank'} documentation for more information about valve syntax and options.
{% endcapture %}

{% include info.html content=remote_host_valve%}
{% capture remote_host_valve %}
Consult the Tomcat [Remote Host Valve](https://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/config/valve.html#Remote_Host_Valve){:target='_blank'} documentation for more information about valve syntax and options.
{% endcapture %}
{% include info.html content=remote_host_valve%}


## Limit Access To Parts Or Entire TDS By User/Role
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,10 @@ The access log entry format we are using is almost identical to the standard com
pattern="%h %l %u %t &quot;%r&quot; %s %b &quot;%{Referer}i&quot; &quot;%{User-Agent}i&quot; %D"
~~~



{%include note.html content="
{% capture logfmt %}
For more information on access log format configuration, see the Tomcat [Valve Component](http://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/config/valve.html){:target='_blank'} documentation.
" %}

{% endcapture %}
{% include info.html content=logfmt %}

The above pattern makes use of the following codes:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ This section assumes you have successfully installed the JDK and Tomcat Servlet
</Context>
~~~

{%include note.html content="
{% capture context %}
Consult the Tomcat documentation about [web application context](http://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/config/context.html){:target='_blank'} for more information about the `META-INF/context.xml` file.
" %}

{% endcapture %}
{% include info.html content=context %}

The down-side of renaming the WAR file to merely `thredds.war` is that a quick glance at the WAR file will not tell you (the server administrator) which version of the TDS is deployed.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ While there are different distributors of Java and servlet containers, Unidata d
The following example shows the JDK installation on a linux system.
The installation is being performed as the `root` user.

{% include note.html content="
For installation of the JDK on Windows or Mac OS, see the [JDK Installation Guide](https://https://adoptium.net/installation/){:target='_blank'}.
" %}
{% capture tomcatinstall %}
For installation of Tomcat on Windows, see the [Tomcat Setup Guide](http://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/setup.html#Windows){:target='_blank'}.
{% endcapture %}
{% include info.html content=tomcatinstall %}

1. [Download](https://adoptium.net/){:target="_blank"} current OpenJDK {{ site.java_version }} (LTS) JDK version from the Adoptium site.

Expand Down Expand Up @@ -82,9 +83,10 @@ The following example shows Tomcat installation on a linux system.
(This type of installation will work on Mac OS systems as well.)
The installation is performed as the `root` user.

{% include note.html content="
{% capture tomcatinstall %}
For installation of Tomcat on Windows, see the [Tomcat Setup Guide](http://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/setup.html#Windows){:target='_blank'}.
" %}
{% endcapture %}
{% include info.html content=tomcatinstall %}

{%- assign tomcat_version_split = site.tomcat_version | split: '.' -%}
{%- assign tomcat_version_split = tomcat_version_split[0] -%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ This section assumes you have successfully installed the JDK and Tomcat Servlet
* Allows Tomcat administrators to deploy, un-deploy, or reload web applications such as the TDS without having to shut down and restart Tomcat.
* Provides server status statistics for the JVM and each connector you have configured in `${tomcat_home}/conf/server.xml`.

{%include note.html content=
{% capture tcmanager %}
"For more information about the Tomcat manager application, see the [Tomcat Manager App HOW-TO](https://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/manager-howto.html){:target='_blank'} documentation.
" %}
{% endcapture %}
{% include info.html content=tcmanager %}

## Accessing The Manager Application

Expand Down Expand Up @@ -57,10 +58,10 @@ This will be done in the following 2 steps:
<Context privileged="true" antiResourceLocking="false" docBase="${catalina.home}/webapps/manager"/>
~~~

{%include note.html content="
{% capture context_config %}
For more information about web application context configuration files and their security options, please review the [Tomcat Manager App How-To](http://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/manager-howto.html#Introduction){:target='_blank'} documentation.
" %}

{% endcapture %}
{% include info.html content=context_config %}

#### II. Modify `tomcat-users.xml`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,10 @@ The access log entry format we are using is almost identical to the standard com
pattern="%h %l %u %t &quot;%r&quot; %s %b &quot;%{Referer}i&quot; &quot;%{User-Agent}i&quot; %D"
~~~



{%include note.html content="
{% capture logfmt %}
For more information on access log format configuration, see the Tomcat [Valve Component](http://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/config/valve.html){:target='_blank'} documentation.
" %}

{% endcapture %}
{% include info.html content=logfmt %}

The above pattern makes use of the following codes:

Expand Down
5 changes: 4 additions & 1 deletion docs/quickstart/src/site/pages/TLSEncryption.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@ The following example demonstrates enabling Transport Layer Security in the Tomc
</Connector>
~~~

Note: Tomcat also offers a `SSL/TLS HTTP/1.1 Connector` which utilizes `APR/native implementation`.
{% capture connector %}
Tomcat also offers a `SSL/TLS HTTP/1.1 Connector` which utilizes `APR/native implementation`.
Consult the [Documentation](http://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/config/http.html){:target='_blank'} to see if you should use this connector in lieu of the `NIO implementation SSL HTTP/1.1` connector.
{% endcapture %}
{% include info.html content=connector %}

Specify the keystore file in the `certificateKeystoreFile` attribute of the `Certificate` element to tell Tomcat where to find your keystore (the path will be relative to `${tomcat_home}` directory).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ This section assumes you have successfully installed the JDK and Tomcat Servlet
<Context path="/thredds">
</Context>
~~~
{%include note.html content="

{% capture context %}
Consult the Tomcat documentation about [web application context](http://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/config/context.html){:target='_blank'} for more information about the `META-INF/context.xml` file.
" %}
{% endcapture %}
{% include info.html content=context %}

The down-side of renaming the WAR file to merely `thredds.war` is that a quick glance at the WAR file will not tell you (the server administrator) which version of the TDS is deployed.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ The following example shows Tomcat installation on a linux system.
(This type of installation will work on Mac OS systems as well.)
The installation is performed as the `root` user.

{% include note.html content="
{% capture tomcatinstall %}
For installation of Tomcat on Windows, see the [Tomcat Setup Guide](http://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/setup.html#Windows){:target='_blank'}.
" %}
{% endcapture %}
{% include info.html content=tomcatinstall %}

{%- assign tomcat_version_split = site.tomcat_version | split: '.' -%}
{%- assign tomcat_version_split = tomcat_version_split[0] -%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ This section assumes you have successfully installed the JDK and Tomcat Servlet
* Allows Tomcat administrators to deploy, un-deploy, or reload web applications such as the TDS without having to shut down and restart Tomcat.
* Provides server status statistics for the JVM and each connector you have configured in `${tomcat_home}/conf/server.xml`.

{%include note.html content=
{% capture tcmanager %}
"For more information about the Tomcat manager application, see the [Tomcat Manager App HOW-TO](https://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/manager-howto.html){:target='_blank'} documentation.
" %}
{% endcapture %}
{% include info.html content=tcmanager %}

## Accessing The Manager Application

Expand Down Expand Up @@ -57,10 +58,10 @@ This will be done in the following 2 steps:
<Context privileged="true" antiResourceLocking="false" docBase="${catalina.home}/webapps/manager"/>
~~~

{%include note.html content="
{% capture context_config %}
For more information about web application context configuration files and their security options, please review the [Tomcat Manager App How-To](http://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/manager-howto.html#Introduction){:target='_blank'} documentation.
" %}

{% endcapture %}
{% include info.html content=context_config %}

#### II. Modify `tomcat-users.xml`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,10 @@ The access log entry format we are using is almost identical to the standard com
pattern="%h %l %u %t &quot;%r&quot; %s %b &quot;%{Referer}i&quot; &quot;%{User-Agent}i&quot; %D"
~~~



{%include note.html content="
{% capture logfmt %}
For more information on access log format configuration, see the Tomcat [Valve Component](http://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/config/valve.html){:target='_blank'} documentation.
" %}

{% endcapture %}
{% include info.html content=logfmt %}

The above pattern makes use of the following codes:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@ A Tomcat Realm represents a "database" of usernames, passwords, and roles assign
supersecretpassword:bb7a2b6cf8da7122125c663fc1585808170b2027677195e0ad121f87b27320ae$1$55003acb56e907b19d29d3b4211dc98c837354690bc90579742d6747efeec4ea
~~~

{% include note.html content="
To use a different algorithm, a salt, or to limit the length of the resulting password hash, consult the [syntax options](https://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/realm-howto.html#Digested_Passwords){:target='_blank'} for the `tomcat_home/bin/digest.[bat|sh]` script.
" %}
{% capture algo %}
To use a different algorithm, a salt, or to limit the length of the resulting password hash, consult the [syntax options](https://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/realm-howto.html#Digested_Passwords){:target='_blank'} for the `tomcat_home/bin/digest.[bat|sh]` script.
{% endcapture %}
{% include info.html content=algo %}

3. Update `${tomcat_home}/conf/tomcat-users.xml` to replace your clear-text password with the encrypted version:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ Tomcat uses the keystore file for TLS/SSL transactions.

## Enabling TLS/SSL In Tomcat

The following example demonstrates enabling TLS/SSL in the Tomcat Servlet Container on a linux system as the `root` user.
The following example demonstrates enabling TLS/SSL in the Tomcat Servlet Container on a linux system as the `root` user.

{%include note.html content="
{% capture cert %}
This section assumes you have already imported your CA-signed certificate into the [keystore](https://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/ssl-howto.html#Prepare_the_Certificate_Keystore){:target='_blank'} file.
" %}
{% endcapture %}
{% include info.html content=cert %}

1. Modify the Tomcat configuration to enable TLS/SSL:

Expand Down Expand Up @@ -84,10 +85,12 @@ This section assumes you have already imported your CA-signed certificate into t
</SSLHostConfig>
</Connector>
~~~

{%include note.html content="
Tomcat also offers a `SSL/TLS HTTP/1.1 Connector` which utilizes `APR/native implementation`. Consult the [Documentation](http://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/config/http.html){:target='_blank'} to see if you should use this connector in lieu of the `NIO implementation SSL HTTP/1.1` connector.
" %}

{% capture connector %}
Tomcat also offers a `SSL/TLS HTTP/1.1 Connector` which utilizes `APR/native implementation`.
Consult the [Documentation](http://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/config/http.html){:target='_blank'} to see if you should use this connector in lieu of the `NIO implementation SSL HTTP/1.1` connector.
{% endcapture %}
{% include info.html content=connector %}

Specify the keystore file in the `certificateKeystoreFile` attribute of the `Certificate` element to tell Tomcat where to find your keystore (the path will be relative to `${tomcat_home}` directory).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ The `RemoteHostValve` compares the client hostname against one or more regular e
deny=".*\.bandwidthhogs\.com" />
~~~

{%include note.html content="
Consult the Tomcat [Remote Host Valve](https://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/config/valve.html#Remote_Host_Valve){:target='_blank'} documentation for more information about valve syntax and options.
" %}

{% capture remote_host_valve %}
Consult the Tomcat [Remote Host Valve](https://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/config/valve.html#Remote_Host_Valve){:target='_blank'} documentation for more information about valve syntax and options.
{% endcapture %}
{% include info.html content=remote_host_valve%}

## Restrict Access Via Web Application Deployment Descriptor

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,10 @@ The following example shows how to implement a proxy using the Apache HTTPD serv
protocol="AJP/1.3" />
~~~
{% include note.html content="
{% capture ajp_connector %}
Consult the Tomcat documentation for more information about the [AJP Connector](https://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/config/ajp.html){:target='_blank'} configuration options.
" %}
{% endcapture %}
{% include info.html content=ajp_connector %}
2. Disable any active `Java HTTP/1.1 Connector` and the `SSL HTTP/1.1 Connector` Tomcat connectors.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ This section assumes you have successfully installed the JDK and Tomcat Servlet
<Context path="/thredds">
</Context>
~~~
{%include note.html content="

{% capture context %}
Consult the Tomcat documentation about [web application context](http://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/config/context.html){:target='_blank'} for more information about the `META-INF/context.xml` file.
" %}
{% endcapture %}
{% include info.html content=context %}

The down-side of renaming the WAR file to merely `thredds.war` is that a quick glance at the WAR file will not tell you (the server administrator) which version of the TDS is deployed.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ The following example shows Tomcat installation on a linux system.
(This type of installation will work on Mac OS systems as well.)
The installation is performed as the `root` user.

{% include note.html content="
{% capture tomcatinstall %}
For installation of Tomcat on Windows, see the [Tomcat Setup Guide](http://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/setup.html#Windows){:target='_blank'}.
" %}
{% endcapture %}
{% include info.html content=tomcatinstall %}

{%- assign tomcat_version_split = site.tomcat_version | split: '.' -%}
{%- assign tomcat_version_split = tomcat_version_split[0] -%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ This section assumes you have successfully installed the JDK and Tomcat Servlet
* Allows Tomcat administrators to deploy, un-deploy, or reload web applications such as the TDS without having to shut down and restart Tomcat.
* Provides server status statistics for the JVM and each connector you have configured in `${tomcat_home}/conf/server.xml`.

{%include note.html content=
{% capture tcmanager %}
"For more information about the Tomcat manager application, see the [Tomcat Manager App HOW-TO](https://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/manager-howto.html){:target='_blank'} documentation.
" %}
{% endcapture %}
{% include info.html content=tcmanager %}

## Accessing The Manager Application

Expand Down Expand Up @@ -57,10 +58,10 @@ This will be done in the following 2 steps:
<Context privileged="true" antiResourceLocking="false" docBase="${catalina.home}/webapps/manager"/>
~~~

{%include note.html content="
{% capture context_config %}
For more information about web application context configuration files and their security options, please review the [Tomcat Manager App How-To](http://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/manager-howto.html#Introduction){:target='_blank'} documentation.
" %}

{% endcapture %}
{% include info.html content=context_config %}

#### II. Modify `tomcat-users.xml`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,10 @@ The access log entry format we are using is almost identical to the standard com
pattern="%h %l %u %t &quot;%r&quot; %s %b &quot;%{Referer}i&quot; &quot;%{User-Agent}i&quot; %D"
~~~



{%include note.html content="
{% capture logfmt %}
For more information on access log format configuration, see the Tomcat [Valve Component](http://tomcat.apache.org/tomcat-{{ site.tomcat_version }}-doc/config/valve.html){:target='_blank'} documentation.
" %}

{% endcapture %}
{% include info.html content=logfmt %}

The above pattern makes use of the following codes:

Expand Down
Loading

0 comments on commit 0fdbfee

Please sign in to comment.