Permission denied in Apache logs when used as a reverse proxy

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Problem

When using Apache as a reverse proxy, Apache responds with a message that the Bitbucket server is not available and the following can be seen in the Apache error logs:

1 [error] (13)Permission denied: proxy: HTTP: attempt to connect to 192.168.1.1:7990 (bitbucket.example.com) failed

Diagnosis

Environment

  • This error can occur on RedHat or CentOS.

Cause

By default, SELinux prevents Apache from initiating outbound connections, so it is unable to proxy requests to Bitbucket Server.

Solution

Resolution

Run the following command on the server to allow Apache to make outbound connections.

1 /usr/sbin/setsebool -P httpd_can_network_connect 1

You can also review the SELinux configurations and add the Bitbucket ports, by following instructions from the Change Ports Numbers document.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.