Configuring server.xml after "splitting" the server
Asked by Carl Wiedebaum:

Hi All,

We used to run both Jira and Confluence in a single VM. Now we decided to split the applications to their own VMs. Splitting was done by cloning and renaming the second VM, and disabling Confluence from the first VM and Jira from the second.

Now I need to figure out how to configure the server.xml so that jira can be found at jira.company.com and confluence from confluence.company.com.

I tried to check the original server.xml's but I could not figure out how to change them.

Bellow is the current Server.xml for confluence ( Https is not required ):

```
<Server port="8000" shutdown="SHUTDOWN" debug="0">
 <Service name="Tomcat-Standalone">
 <Connector port="8090" connectionTimeout="20000" redirectPort="8443"
 maxThreads="48" minSpareThreads="10"
 enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
 protocol="org.apache.coyote.http11.Http11NioProtocol" />

 <Engine name="Standalone" defaultHost="localhost" debug="0">

 <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false" startStopThreads="4">
 <Context path="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true">
 <!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->
 <Manager pathname="" />
 <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" />
 </Context>

 <Context path="${confluence.context.path}/synchrony-proxy" docBase="../synchrony-proxy" debug="0" reloadable="false" useHttpOnly="true">
 <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" />
 </Context>
 </Host>

 </Engine>

 <!--
 To run Confluence via HTTPS:
 * Uncomment the Connector below
 * Execute:
 %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
 $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
 with a password value of "changeit" for both the certificate and the keystore itself.
 * Restart and visit https://localhost:8443/

 For more info, see https://confluence.atlassian.com/display/DOC/Running+Confluence+Over+SSL+or+HTTPS
 -->

 <Connector port="8443" maxHttpHeaderSize="8192"
 maxThreads="150" minSpareThreads="25"
 protocol="org.apache.coyote.http11.Http11NioProtocol"
 enableLookups="false" disableUploadTimeout="true"
 acceptCount="100" scheme="https" secure="true"
 clientAuth="false" sslProtocols="TLSv1,TLSv1.1,TLSv1.2" sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2" SSLEnabled="true"
 keystoreFile="D:\Confluence\conf\Security\keystore_2018.jks"
 URIEncoding="UTF-8" keystorePass="XXXXXXXXXXXX"/>

 </Service>
</Server>

```


Answers:
author: Bastian Stehmann
body: Hi [@Carl Wiedebaum](/t5/user/viewprofilepage/user-id/1172054),

The server.xml file configures, on which ports the tomccat listens, which protocols are used, and if an proxy is used and such things.

That Jira.company.com leads to Jira and confluence.company.com leads to confluence is configured within your DNS configuration, where you configure what (sub)domain leads to which IP.

comments: author: Carl Wiedebaum
body: Hi [@Bastian Stehmann](/t5/user/viewprofilepage/user-id/1186496),  

The DNS configuration is already made so that confluence.company.com leads to the actual confluence server. but since the confluence is "cloned" from the original server, confluence can only be accessed at <https://confluence.company.com:8443>.

What I want to achieve is that confluence.company.com works for confluence - just like at the moment jira.company.com works for jira.

My initial assumption was to change:

```
<Connector port="8443" maxHttpHeaderSize="8192"
 maxThreads="150" minSpareThreads="25"
```

<br />

to:

```
<Connector port="80" maxHttpHeaderSize="8192"
 maxThreads="150" minSpareThreads="25"
```

What confuses me that in the currently working as intended Jiras server.xml there is also specified the domain name, but corresponding setting in the confluences server.xml can't be found.


author: Bastian Stehmann
body: Ok, got it.

You are right, changing the port should do.

There is no need to have the server name there.

Edit: if you do not want to use SSL, I would comment that connector out.


author: Carl Wiedebaum
body: So I fully comment the SSL connector out and from the first connector:

```
<Connector port="8090" connectionTimeout="20000" redirectPort="8443"
 maxThreads="48" minSpareThreads="10"
 enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
 protocol="org.apache.coyote.http11.Http11NioProtocol" />
```

<br />

I change the port 8090 to 80 and remove the "redirectPort" section? So the end result would look like:

```
<Connector port="80" connectionTimeout="20000"
 maxThreads="48" minSpareThreads="10"
 enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
 protocol="org.apache.coyote.http11.Http11NioProtocol" />
```

?


author: Bastian Stehmann
body: Yes, I think that looks good to me.


author: Carl Wiedebaum
body: Thank you :)


Tags: questions-for-confluence