Changeset 32346 for main/trunk
- Timestamp:
- 2018-08-17T22:09:16+12:00 (6 years ago)
- Location:
- main/trunk/greenstone3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/build.properties.svn
r32337 r32346 4 4 ## Tomcat installation 5 5 6 # The protocol (http, https)7 server.protocol=http8 9 6 # Set this to the internet/intranet name of the machine that Tomcat is/will be 10 7 # run on. localhost is fine for accessing the server from the local machine, 11 8 # but not remotely 12 9 tomcat.server=localhost 10 11 # The default protocol: http, or https for security 12 # If you wish to use both, set the default protocol here (https recommended), then 13 # uncomment both tomcat.port.http and tomcat.port.https and set them to valid port numbers. 14 server.protocol=http 15 16 # At minimum, the tomcat.port matching the default server.protocol specified above 17 # must be enabled (uncommented) below and be set to a valid port number. 18 # You're allowed to enable both tomcat.port values here. 13 19 tomcat.port.http=8383 14 20 tomcat.port.https=8443 21 # You must set a password if using https (if tomcat.port.https is uncommented above) 22 keystore.pass= 23 15 24 # Tomcat's shutdown port - this may need to be changed if you are running two or more Tomcats 16 25 tomcat.shutdown.port=8305 26 17 27 # If tomcat is already running, enter the path to the base directory here 18 28 tomcat.installed.path= -
main/trunk/greenstone3/build.xml
r32344 r32346 85 85 <bool><not><available file="build.properties"/></not></bool> 86 86 <copy file="build.properties.svn" tofile="build.properties"/> 87 <property name="first.run" /> 87 88 </if> 88 89 … … 143 144 Try setting tomcat.port.https=8443 144 145 </fail> 146 </if> 147 148 <!-- 149 Bail if https is enabled but the keystore password (keystore.pass property) is not set. 150 However, keystore.pass has no default value and is therefore not set as a rule. So don't bail when 'ant' is run for the first time to create buil.dprops from build.props.svn. But do bail if running ant.prepare and https enabled and password not set. 151 (Maybe put this entire section before the first target: so we only bail after all non-targets are executed so that any other first ever initialisation is completed?) 152 --> 153 <if> 154 <bool> 155 <and> 156 <isset property="tomcat.port.https"/> 157 <or> 158 <not><isset property="keystore.pass"/></not> 159 <matches string="${keystore.pass}" pattern="^\s*$"/> 160 </or> 161 </and> 162 </bool> 163 <if> 164 <bool><isset property="first.run"/></bool> 165 <echo>IMPORTANT: When tomcat.port.https is set in file build.properties, as now, 166 the keystore.pass property must be set to a non-empty value. 167 Either comment out tomcat.port.https if you don't want support for https, 168 or set keystore.pass.</echo> 169 <else> 170 <fail>... 171 ********* ERROR: tomcat.port.https in file build.properties is set, but its required keystore.pass property is not set or is set to the empty string. Choose a password for keystore.pass and set it in build.properties before proceeding. 172 </fail> 173 </else> 174 </if> 145 175 </if> 146 176 … … 191 221 </propertyfile> 192 222 223 <!-- For setting filter tokens. 224 Used to set up server.xml when configuring tomcat --> 225 <property name="comment.start" value="<!--" /> 226 <property name="comment.end" value="-->" /> 227 <!-- originally, https redirectPort when using regular http port 8383 228 was always fixed at 8443. Now we use redirectPort=tomcat.port.https unless 229 it's not set, in which case we fall back to the original value of 8443. --> 230 <condition property="https.redirect.port" value="${tomcat.port.https}" else="8443"> 231 <isset property="tomcat.port.https"/> 232 </condition> 233 234 <!-- if http is not enabled, comment out its Connecter element in server.xml --> 235 <condition property="http.comment.out.start" value="" else="${comment.start}"> 236 <isset property="tomcat.port.http"/> 237 </condition> 238 <condition property="http.comment.out.end" value="" else="${comment.end}"> 239 <isset property="tomcat.port.http"/> 240 </condition> 241 <!-- if https is not enabled, comment out its Connecter element in server.xml --> 242 <condition property="https.comment.out.start" value="" else="${comment.start}"> 243 <isset property="tomcat.port.https"/> 244 </condition> 245 <condition property="https.comment.out.end" value="" else="${comment.end}"> 246 <isset property="tomcat.port.https"/> 247 </condition> 193 248 194 249 <!-- now we've read in properties, apply defaults --> … … 1605 1660 tofile="${packages.home}/tomcat/conf/server.xml" overwrite="true"> 1606 1661 <filterset> 1607 <filter token="port" value="${internal.tomcat.port}"/>1608 1662 <filter token="shutdown-port" value="${tomcat.shutdown.port}"/> 1663 <filter token="https.redirect.port" value="${https.redirect.port}"/> 1664 <filter token="tomcat.port.http" value="${tomcat.port.http}"/> 1665 <filter token="tomcat.port.https" value="${tomcat.port.https}"/> 1666 <filter token="keystore.file" value="${web.writablehome}/https_cert/${tomcat.server}.jks" /> 1667 <filter token="keystore.pass" value="${keystore.pass}"/> 1668 <filter token="http.comment.out.start" value="${http.comment.out.start}"/> 1669 <filter token="http.comment.out.end" value="${http.comment.out.end}"/> 1670 <filter token="https.comment.out.start" value="${https.comment.out.start}"/> 1671 <filter token="https.comment.out.end" value="${https.comment.out.end}"/> 1609 1672 </filterset> 1610 1673 </copy> -
main/trunk/greenstone3/resources/tomcat/server_tomcat7.xml.svn
r32309 r32346 68 68 Define a non-SSL HTTP/1.1 Connector on port @port@ 69 69 --> 70 <Connector port="@port@" protocol="HTTP/1.1" 70 @http.comment.out.start@ 71 <Connector executor="tomcatThreadPool" 72 port="@tomcat.port.http@" protocol="HTTP/1.1" 71 73 connectionTimeout="20000" 72 redirectPort=" 8443"74 redirectPort="@https.redirect.port@" 73 75 compression="on" 74 76 compressionMinSize="524288" … … 77 79 URIEncoding="UTF-8" 78 80 /> 81 @http.comment.out.end@ 79 82 <!-- A "Connector" using the shared thread pool--> 80 83 <!-- 81 84 <Connector executor="tomcatThreadPool" 82 port=" 8080" protocol="HTTP/1.1"85 port="@tomcat.port.http@" protocol="HTTP/1.1" 83 86 connectionTimeout="20000" 84 redirectPort=" 8443" />87 redirectPort="@https.redirect.port@" /> 85 88 --> 86 89 <!-- Define a SSL HTTP/1.1 Connector on port 8443 … … 93 96 clientAuth="false" sslProtocol="TLS" /> 94 97 --> 98 @https.comment.out.start@ 99 <Connector port="@tomcat.port.https@" protocol="org.apache.coyote.http11.Http11Protocol" 100 maxThreads="150" SSLEnabled="true" scheme="https" secure="true" 101 keystoreFile="@keystore.file@" 102 keystorePass="@keystore.pass@" 103 clientAuth="false" sslProtocol="TLS" /> 104 @https.comment.out.end@ 95 105 96 106 <!-- Define an AJP 1.3 Connector on port 8009 --> 97 <Connector port="8009" protocol="AJP/1.3" URIEncoding="UTF-8" redirectPort="8443" /> 98 107 <Connector port="8009" protocol="AJP/1.3" URIEncoding="UTF-8" redirectPort="@https.redirect.port@" /> 99 108 100 109 <!-- An Engine represents the entry point (within Catalina) that processes
Note:
See TracChangeset
for help on using the changeset viewer.