REST API breaking over HTTP Calls after we switched to HTTPS

We have moved our JIRA from HTTP to HTTPS following : https://confluence.atlassian.com/jira/integrating-jira-with-apache-using-ssl-203395380.html

Things are working fine on browser, but all our rest api calls are breaking with the error message :

HTTP/1.1 302 Found
Date: Tue, 08 Mar 2016 18:20:56 GMT
Server: Apache/2.2.3 (Oracle)
Location: https://jiraxxxxx/rest/api/2/project/BA/components
Content-Length: 352
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://jiraxxxxx/rest/api/2/project/BA/components">here</a>.</p>
<hr>
<address>Apache/2.2.3 (Oracle) Server at jira.xxxxl Port 80</address>
</body></html>

 

It starts to work as soon as we change the url in the curl command to use HTTPS.

 

However we want REST API to be automatically redirected to HTTPS if someone uses HTTP, is that possible ?

 

What config change do we have to do for apache ?

2 answers

1 accepted

0 vote
Josh Steckler Community Champion Mar 08, 2016

If you're using cURL, use the -L flag to follow redirects.

thanks @Josh S, -L worked but only for curl GET and not for POST.

do i have to change anything on ssl.config or httpd.conf ?

Hi Rashi,

Maybe you try to configure a 301 redirect instead of a 302

Cheers,

Julian

hi @Julian Riedinger

thanks for your reply, how do I do that config and where ? 

can you please elaborate 

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Feb 15, 2018 in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

1,134 views 6 19
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot