I’m trying to add the following lines after redirectPort=“8443”:
proxyName=“mywebsitename.com”
proxyPort=“443”
scheme=“https”>
However, there are multiple lines of redirectPort=“8443” in the document, so if I use the blockinfile option, it adds those lines to the wrong section of the document.
The section I want to add it to looks like this:
<Connector
port="1234"
protocol="HTTP/1.1"
maxThreads="150" minSpareThreads="25"
connectionTimeout="20000"
disableUploadTimeout="true"
acceptCount="100"
enableLookups="false"
maxHttpHeaderSize="8192"
useBodyEncodingForURI="true"
URIEncoding="UTF-8"
redirectPort="8443">
The only defining feature between this section and other sections is the Service name = “Catalina”. I thought maybe I could replace this entire Section with the same section, but with additional lines, but I’m having trouble doing that. Is it possible to replace an entire block with another block of lines when everything inside of the block repeats in the document?
This is what I want it to look like:
<Connector
port="1234"
protocol="HTTP/1.1"
maxThreads="150" minSpareThreads="25"
connectionTimeout="20000"
disableUploadTimeout="true"
acceptCount="100"
enableLookups="false"
maxHttpHeaderSize="8192"
useBodyEncodingForURI="true"
URIEncoding="UTF-8"
redirectPort="443"
proxyName="mywebsitename.com"
proxyPort="443"
scheme="https">