7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

RedmineとZabbixを共存させるApacheの設定(Virtualhost)

Last updated at Posted at 2016-01-13

RedmineとZabbixの共存

監視上で検知したものを、自動的にインシデント登録されるようにしたいと考えている。RedmineとZabbixを使用して実現する。本来であれば、別々のサーバで立てるのが好ましいが、予算の関係上共存させなければいけないこともあるだろう。
Apacheの設定で分けることにした。忘れないようにメモレベルで投稿します。

Apache設定(VirtualHost)

色々方法はあるが、Listenするポートを変更してしまうのが、一番楽。
Listenポートを2つ指定して、VirtualHostの設定をしよう。

httpd.conf
# DocumentRoot "/usr/share/redmine/public         ★コメントアウト
Listen 80                # Redmine用
Listen 8080              # Apache用

# redmine用VirtualHost
<VirtualHost xxx.xxx.xxx.xxx:80>         #xxxにはIPアドレス
ServerName hogehoge            #hogehogeにはServerName
DocumentRoot "/var/lib/redmine/public"   #RedmineのDocumentRoot
</VirtualHost>

# zabbix用VirtualHost
<VirtualHost xxx.xxx.xxx.xxx:8080>       #xxxにはIPアドレス
ServerName hogehoge                      #hogehogeにはServerName
DocumentRoot "/usr/share/zabbix"         #RedmineのDocumentRoot
</VirtualHost>

アクセス

Apacheを再起動して、アクセスしてみよう。

# service httpd restart

アクセスは、以下のようになります。
http://hogehoge ★Redmine
http://hogehoge:8080 ★Zabbix

今後の課題

RedmineとZabbixのMySQLのインスタンスを分ける(個々にメンテできなくなるため)。
冗長化の検討(監視もインシデント管理もミッションクリティカルではないが、巨大な規模になってくると停止したときに、別の管理方法に切り替えるのが面倒。あまり止めたくない)。

7
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?