How Do I Use Port 80 or 443 on My Server as a Non-Root User on Linux
このページの内容は、JIRA でサポートされていないプラットフォームに関連しています。したがって、アトラシアンは、そのためのサポートの提供を保証できません 。この資料は情報提供のみを目的としているため、お客様自身の責任でご使用ください。
問題
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 8060. The following commands can be used to redirect the traffic:
iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 8060 -j ACCEPT
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8060
If Fisheye/Crucible has been configured for SSL on port 8061 for example, the following commands will redirect traffic from port 443 to 8061:
iptables -A INPUT -i eth0 -p tcp --dport 443 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 8061 -j ACCEPT
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8061
Using a proxy
A proxy server running as root can bind to port 80 or 443 and proxy all the traffic for Fisheye. Our documentation that helps describe this process can be found at Integrating with other web servers