我在我的Ubuntu服务器上安装了jenkins,我只用sudo apt-get install jenkins
安装了jenkins,因此,现在可以从指向我的方框的所有域中访问jenkins,只需将:8080
在URL上。防止Jenkins在端口8080上访问
我已经成功地配置Apache来代理詹金斯我可以从ci.mydomain.com
访问它,但我不能工作了如何防止詹金斯被在8080端口上
这里访问的是我的Apache的conf:
<VirtualHost xx.xx.xx.xx:80>
ServerAdmin [email protected]
ServerName ci.mydomain.com
ProxyPass /http://localhost:8080/
ProxyPassReverse/http://localhost:8080/
ProxyRequests Off
<Proxy http://localhost:8080/*>
Order deny,allow
Allow from all
</Proxy>
</VirtualHost>
我按照Ubuntu说明here,但他们似乎没有任何效果。
你可以用'iptables',因为它是Ubuntu的,为阻止端口8080的所有非本地访问所有非本地访问。 'iptables -A INPUT -t tcp -dport 8080 -s localhost -j ACCEPT'和'iptables -A INPUT -t tcp -dport 8080 -j DROP' – ionFish
@ionFish谢谢,它抱怨'--dport'选项虽然无法识别,添加此作为答案也许? – Dunhamzzz