服务器 Gind.cn

服务器问题集锦,包括 Linux(Ubuntu, Centos,Debian等)和Windows Server服务器

在端口8080上lockingJenkins

我的同事在我们的一台testing服务器上安装了Jenkins。 当我访问服务器的IP和端口8080,jenkins正在运行,即99.999.999.999:8080 我想将Jenkins应用程序locking到外部世界,并且只能从内部IP地址获得它。 所以我在apache中设置了一个VirtualHost,如下所示: <VirtualHost *:80> ServerName jenkins.mytestserver.com ErrorLog logs/jenkins.mytestserver.com-error_log CustomLog logs/jenkins.mytestserver.com-access_log common #ProxyPass /usr/share/tomcat6/webapps/ ajp://127.0.0.1:8080/usr/share/tomcat6/webapps/ #ProxyPassReverse /usr/share/tomcat6/webapps/ ajp://127.0.0.1:8080/usr/share/tomcat6/webapps/ #ProxyRequests Off ProxyPass / http://localhost:8080/ nocanon ProxyPassReverse / http://localhost:8080/ ProxyRequests Off ProxyPreserveHost On <Location /> order deny,allow deny from all Allow from 11.111.111.111 </Location> </VirtualHost> Vhost的作品,我可以通过jenkins.mytestserver.com访问jenkins,并从外部世界阻止。 如何通过99.999.999.999:8080阻止外部世界访问它? 我有一种感觉,我已经做了ReverseProxy上面的方式是不正确的,因为它只是传递请求到http:// localhost:8080 /这是一样的http://99.999.999.999:8080 我一直在引用下面的文档: https://wiki.jenkins-ci.org/display/JENKINS/Apache+frontend+for+security https://www.mulesoft.com/tcat/tomcat-connectors (我认为我的问题的答案是在这个文档,但我不明白)。 任何帮助赞赏。 问候,斯蒂芬