Images remain http after moving Confluence to https

Hello all!

I first installed Confluence 4.3 locally and ran it via http on port 8090. During this time I added a lot of pages with images in the content.

Recently I moved Confluence to a server, and secured it behind Apache. Everything is working well aside from the images. I access my wiki via, and all content comes through but no images render. Firebug shows me that everything is being served via https besides the images which are still

If I change the image url to https and drop the port in another browser tab, then the image is shown correctly. So I'm happy that they are still there and can be served from Confluence.

I've had a look in the admin section but I don't see anything specific to the URLs of images. BTW, my baseURL is set to, which I've read it should be.

Does anyone know of a way to fix the image URLs without needing to delete and re-add each image? There must be something I'm missing here...



2 answers

1 accepted

1 vote
Answer accepted

There is also a chance that the URL of the images have been hardcoded into Confluence's database when they were inserted. In this case you can check this executing this query:

select * from BODYCONTENT where body like '%';

And then execute the following query to change the URL:

   SET BODY = REPLACE(BODY,'<old_string>','<new_string>');

  • <old_string>: string to search on the field BODY, which will be replaced for '<new_string>'.
  • <new_string>: string which will replace '<old_string>'

I hope this helps.


Worked a treat! Thanks for that Tiago.

I'm still going to raise a defect though - I should not have to do this. I would think that the Server Base URL in the admin section would be used for things like this. The fact that the URLs are clearly saved into the DB regardless of the Server Base URL is something I think should be addressed.

Either way, it's working now! Much appreciated!




I've set Confluence to run behind Apache using this instructions. My httpd.conf is set as below:

# Put this after the other LoadModule directives
# LoadModule proxy_module /usr/lib/apache2/modules/
# LoadModule proxy_http_module /usr/lib/apache2/modules/
# Put this in the main section of your configuration (or desired virtual host, if using Apache virtual hosts)
ProxyRequests Off
ProxyPreserveHost On
SSLProxyEngine on
&lt;Proxy *&gt;
    Order deny,allow
    Allow from all
ProxyPass /confluence http://localhost:8090/confluence
ProxyPassReverse /confluence http://localhost:8090/confluence
&lt;Location /confluence&gt;
    Order allow,deny
    Allow from all

And I've modified my server.xml to this:

&lt;Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8090" minProcessors="5"
                   enableLookups="false" redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="20000"
                   useURIValidationHack="false" URIEncoding="UTF-8"
		   proxyName="" proxyPort="443" scheme="https"

Using this configuration everything works fine, including the images. You may compare this configuration with yours.

I hope this have helped.


Thanks Tiago,

I have almost the exact same setup aside from the server.xml changes - I tried them, but I have issues with the proxyName (it gets confused with my ISP). However I don't think this is the problem.

As a test, I just edited one of the pages containing images, added a brand new image, and saved it. The new image displays correctly. It has a URL starting with, withbut the other broken images remain on the old

So I'm confident that this setup is correct and working, it just seems that the image URLs that were created before the move are not updated.

I'm thinking I might raise a bug for this...



Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,441 views 3 13
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you