Get Confluence working on a subdomain

Philip Deubner August 14, 2017

Software properties:

  • OS: Ubuntu 16.04 (with PLESK installed)
  • Webserver: Apache 2.4.18
  • Confluence 6.3.1

 

Dear all,

I simply try to get Confluence working on a subdomain like sub.domain.tld.

To do so, I read the documentation and the community forums.

After doing so, I felt ready to start.

What I did was to

  1. Create an A-name entry for the sub-domain in the DNS
  2. Add the subdomain to /etc/hosts
  3. Install Confluence
  4. Create a config file under /etc/apache2/confluence with the entries, where XXX.XXX.XXX.XXX is my IP-adress:
<VirtualHost XXX.XXX.XXX.XXX:80>
    ServerName sub.domain.tld
 
	ProxyRequests Off
	
	# Auth changes in 2.4
	<Proxy XXX.XXX.XXX.XXX>
		Require all granted
	</Proxy>

	ProxyPass /synchrony http://<internal_domain>:8091/synchrony

	<Location /synchrony>
		Require all granted
		RewriteEngine on
		RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
		RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
		RewriteRule .* ws://domain.tld:8091%{REQUEST_URI} [P]
	</Location>

	ProxyPass / h ttp://domain.tld:8090/
	ProxyPassReverse / h ttp://domain.tld:8090/

	<Location />
		Require all granted
	</Location>
 
</VirtualHost><code></code>
  • Enable the new site
  • Change server.xml according to this documentation (add proxy name, proxy port and scheme)
  • Restart Confluence 
  • Restart Apache2

Unfortunately, this does not help me.

When entering sub.domain.tld in a browser, I am redirected to the PLESK "standard" webpage. Only entering the port 8090 will allow me to enter the confluence webpage.

Any ideas from your side?

Thank you in advance,

best regards,

 

Philip

2 answers

1 accepted

0 votes
Answer accepted
Philip Deubner August 14, 2017

@Nic Brough -Adaptavist-:

Thank you for your support. This was - unfortunately - only a problem in this post.

The "real" lines are

ProxyPass / http://domain.tld:8090/

ProxyPassReverse / http://domain.tld:8090/

Any other idea on what might be wrong?

Thank you in advance.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 14, 2017

Hmm.  It looks good to me, so I don't think it's your config.

Two other thoughts -

1) Can you try "sudo netstat - plant" to check that it really is apache listening on port 80?

2) In your apache config, how is Plesk configured?

Philip Deubner August 14, 2017

@Nic Brough -Adaptavist-

Your other thoughts were right.

Due to the Plesk integration, the vhost configuration nedded to start with

<VirtualHost XXX.XXX.XXX.XXX:7080 >
ServerName "sub.domain.tld:80"

[...]

After applying these changes, it worked.

Thank you for yur support.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 14, 2017

Ah, so Apache was serving up Plesk first on port 80 and then ignoring Confluence because it was listed lower?

Philip Deubner August 14, 2017

You're right.

Solved it finally thanks to your ideas.

Nicolas Rehner January 27, 2018

@Philip Deubner Is <VirtualHost XXX.XXX.XXX.XXX:7080> a Standard-Port when using Plesk? Or do I have to find out the individual one for my setup?

Philip Deubner January 28, 2018

@Nicolas Rehner: 7080 seems to be a Plesk standard port.

So from my assumption, this should also work at your place.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 14, 2017

Your proxypass and proxypassreverse lines are wrong.

The first one for synchrony is ok, but the other two are html url links and have too many entries.  They should be as simple as the synchrony one, and only one url.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events