Use port 80 or 443 for Jira server in Linux when running as a non-root user

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く


アトラシアン アプリケーションの製品内でリバース プロキシを使用できますが、アトラシアン サポートはその設定についての支援は行いません。つまり、アトラシアンではリバース プロキシに関するあらゆるサポートの提供が保証されません

設定でサポートが必要な場合、アトラシアン コミュニティに質問を登録してください。

問題

On Linux, non-root users are not able to bind to ports below 1024. For security reasons, it's not recommended to run Atlassian software as a root user. This guide will outline options to be used so that your server can be accessible on port 80 or 443.

ソリューション

Using iptables

iptables can be used to redirect connections from port 80 to 8080. The following commands can be used to redirect the traffic. 

The ethernet port used in the below example is eth0. You will need to replace eth0 with the name of your network interface.

iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 8080 -j ACCEPT
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080

Depending on the network environment, it should also allow communication to the loopback interface that can be done according to the following command:

iptables -t nat -I OUTPUT -p tcp -o lo --dport 80 -j REDIRECT --to-port 8080



If JIRA has been configured for SSL on port 8443 for example, the following commands will redirect traffic from port 443 to 8443:

iptables -A INPUT -i eth0 -p tcp --dport 443 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 8443 -j ACCEPT
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8443

and the redirect command for the loopback interface

iptables -t nat -I OUTPUT -p tcp -o lo --dport 443 -j REDIRECT --to-port 8443

Then, save iptables, which varies depends on your linux distribution. For example:

# sudo apt install iptables-persistent
# sudo /etc/init.d/iptables-persistent save
# sudo /etc/init.d/iptables-persistent reload

Using a proxy

A proxy server running as root can bind to port 80 or 443 and proxy all the traffic for JIRA. Our documentation that helps describe this process can be found at Proxying Atlassian Server applications.


説明 On Linux, non-root users are not able to bind to ports below 1024. For security reasons, it's not recommended to run Atlassian software as a root user. This guide will outline options to be used so that your server can be accessed on port 80 or 443.
製品Jira
プラットフォームServer
最終更新日 2022 年 9 月 15 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.