Why do I continue to get a Base URL warning?
Asked by whoisearth:

I am trying to access my confluence instance via <https://wiki.domain.com> and continue to get the following warning:
> **Can't check your base URL**
>
> There may be a problem with your proxy configuration.

Within the GUI my "Server Base URL" is

```
https://wiki.domain.com
```

Here are my files

/opt/atlassian/confluence/conf/server.xml

```
 <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"
  proxyName="wiki.domain.com"
  proxyPort="443"
  schema="https"
/>
```

/etc/httpd/conf.d/confluence.conf

```
<VirtualHost *:443>
  ServerName wiki.domain.com
  ProxyRequests Off
  <Proxy *>
    Require all granted
  </Proxy>
  Include ssl/default/ssl.cfg
  ProxyPass / http://wiki.domain.com:8090/
  ProxyPassReverse / http://wiki.domain.com:8090/
</VirtualHost>
<VirtualHost *:80>
  Servername wiki.domain.com
  Redirect Permanent / https://wiki.domain.com
</VirtualHost>
```

/var/atlassian/application-data/confluence/confluence.cfg.xml

```
<property name="confluence.webapp.context.path">/</property>
```

According to the numerous Atlassian KBs I've read everything I've configured is correct however I continue to have issues. I'm running apache 2.4.6 and confluence 6.4.2 (build 7401)


Answers:
author: whoisearth
body: ok so I figured out how to fix it however I'm not 100% certain which part it was that did fix it. Make note of a few things.

/opt/atlassian/confluence/conf/server.xml

1. it's scheme not schema

```
 <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"
  maxHttpHeaderSize="8192"
  useBodyEncodingForURI="true"
  scheme="https"
  proxyName="wiki.28beatty.com"
  proxyPort="443"
/>
```

/etc/httpd/conf.d/confluence.conf

1. notice that \*.443 is abstracted out into two separate VirtualHost

2. notice that there is a \*:8443 VirtualHost

3. notice the trailing / on the Redirect lines

```
<VirtualHost *:80>
 Servername wiki.28beatty.com
 ServerAlias wiki

Redirect permanent / https://wiki.28beatty.com/
</VirtualHost>

<VirtualHost *:8443>
 ServerName wiki.28beatty.com
 ServerAlias wiki

Include ssl/default/ssl.cfg

Redirect permanent / https://wiki.28beatty.com/
</VirtualHost>

<VirtualHost *:443>
 ServerName wiki

Include ssl/default/ssl.cfg

Redirect permanent / https://wiki.28beatty.com/
</VirtualHost>

<VirtualHost *:443>
 ServerName wiki.28beatty.com

Include ssl/default/ssl.cfg

RewriteEngine On
 ProxyRequests Off
 ProxyPreserveHost On

ProxyTimeout 900
 TimeOut 900

RewriteRule ^$ / [R]
 ProxyPass / http://wiki.28beatty.com:8090/
 ProxyPassReverse / http://wiki.28beatty.com:8090/
</VirtualHost>
```

comments: author: Torsten Tiltack
body: Hi,

Just for the following readers... Working for Ubuntu Server (also general Linux with apache / reverse proxy )  

In case your Bitbucket config (https) is working like you would expect BUT you face problems with the relation / connection from JIRA to Bitbucket and / or it throws base URL warnings ... you can do a simple thing to solve this time consuming stuff... Make sure that your virtual host (apache2) config is also redirecting from incoming port 80 to the right place... So i saw the comment of Robin (Thx for that) in top and "just" extended my config with the \<VirtualHost \*:80\> ... \<VirtualHost\> Block. After that restart apache and Atlassian relations are working well without any disturbing base URL warning...   

**My Virtual Host Config**   

```
<VirtualHost *:80>

        Servername YOUR.PROJECT.COM

        Redirect permanent / https://YOUR.PROJECT.COM/

</VirtualHost>

?
<VirtualHost *:443>

  ServerName YOUR.PROJECT.COM

  ProxyPreserveHost on

  ProxyPass / http://localhost:7990/

? 
RewriteEngine On

  RewriteCond %{SERVER_PORT} 80

  RewriteRule ^(.*)$ https://YOUR.PROJECT.COM/$1 [R,L]

  
SSLEngine on

  SSLCertificateFile /etc/apache2/ssl/YOURCERT.crt

  SSLCertificateKeyFile /etc/apache2/ssl/YOURCERT.io.key

  SSLCertificateChainFile /etc/apache2/ssl/intermediate.crt


</VirtualHost>
```


author: Davin Studer
body: Your proxy is set as wiki.domain.dom. It should match your base url wiki.28beatty.com. One of them should change. Are you using a reverse proxy? If not then this part can be removed altogether ...

```
proxyName="wiki.domain.com" proxyPort="443"
```

comments: author: whoisearth
body: apologies and updated for sake of other people I've changed all references to wiki.domain.com. rest assured all values are consistent on my end.

Per my conf.d file yes I'm using a reverse proxy.


author: Nic Brough -Adaptavist-
body: Because your base url is not set to what you've set up as the proxy.

comments: author: whoisearth
body: Please explain where in my config files that is not the case.

My base url within confluence is <https://wiki.domain.com>


Tags: apache

base-url

proxy