0

我在安装了 jenkins 和声纳的 Amazon EC2 上设置了 ubuntu 服务器

我通过从他们的网站下载相关软件包,使用 apt-get 和 sonar 安装了 jenkins

当这些服务启动时,我可以通过 urlhttp://ec2-1-2-3-4:8080和 sonar访问 jenkinshttp://ec2-1-2-3-4:9000

使用 Apache HTTP Server,是否可以将其设置为使用以下 url 导航到 jenkins 和 sonar?

http://ec2-1-2-3-4/jenkins
http://ec2-1-2-3-4/sonar
4

1 回答 1

1

是的,这是可能的,但你必须使用 mod_proxy。我为我的 Jira 安装做了同样的事情。这里是虚拟主机。

ServerName  jira.chidgey.me
  ProxyPreserveHost On

  <Proxy *>
    Order allow,deny
    Allow from all
  </Proxy>

  ProxyPass / http://jira.chidgey.me:8080/
  ProxyPassReverse / http://jira.chidgey.me:8080/

  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html
  DocumentRoot /var/www/vhosts/jira.chidgey.me/httpdocs
于 2013-10-15T09:08:48.817 回答