How to configure Jenkins to run on port 80

后端 未结 13 2202
走了就别回头了
走了就别回头了 2020-12-12 21:45

I\'m running Ubuntu 11.10 and have run sudo apt-get install jenkins to install Jenkins on this system.

I\'ve seen some tutorials on how to setup a rever

13条回答
  •  鱼传尺愫
    2020-12-12 22:23

    In Ubuntu 16.04, this wiki explains how to do it.

    sudo nano /etc/rc.local

    Then add the following just before the exit 0

    #Requests from outside
    iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080
    #Requests from localhost
    iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 8080
    

    Now reboot or run sudo /etc/rc.local to enable port forwarding

提交回复
热议问题