我在我的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