I deploy graylog,but "Server currently unavailable"


I deployed graylog fellow Graylog #47,but “Server currently unavailable”.


juju status :

Model    Controller       Cloud/Region    Version  SLA          Timestamp
graylog  maas-controller  mymaas/default  2.8.10   unsupported  10:41:41+08:00

App            Version  Status   Scale  Charm          Store       Channel  Rev  OS      Message
apache2                 unknown      1  apache2        charmstore            35  ubuntu
elasticsearch  5.6.16   active       1  elasticsearch  charmstore            49  ubuntu  Unit is ready
graylog        2.5.1    active       1  graylog        charmstore            47  ubuntu  Ready with: elasticsearch, mongodb
mongodb        3.6.8    active       1  mongodb        charmstore            59  ubuntu  Unit is ready

Unit              Workload  Agent  Machine  Public address  Ports                                    Message
apache2/0*        unknown   idle   0/lxd/2      80/tcp
elasticsearch/0*  active    idle   0        9200/tcp                                 Unit is ready
graylog/0*        active    idle   0/lxd/0      9000/tcp,9001/tcp                        Ready with: elasticsearch, mongodb
mongodb/0*        active    idle   0/lxd/1       27017/tcp,27019/tcp,27021/tcp,28017/tcp  Unit is ready

Machine  State    DNS         Inst id              Series  AZ       Message
0        started    game-burro           focal   default  Deployed
0/lxd/0  started  juju-4fe877-0-lxd-0  focal   default  Container started
0/lxd/1  started   juju-4fe877-0-lxd-1  focal   default  Container started
0/lxd/2  started  juju-4fe877-0-lxd-2  focal   default  Container started

I use public ip redirction to Intranet private network address with ufw as dellow, 9001            ALLOW FWD   Anywhere on eno2 9000            ALLOW FWD   Anywhere on eno2 9200              ALLOW FWD   Anywhere on eno2

cat  vim /etc/ufw/before.rules
-A PREROUTING -p tcp -i eno2 --dport 59000 -j DNAT --to-destination
-A PREROUTING -p tcp -i eno2 --dport 59001 -j DNAT --to-destination
-A PREROUTING -p tcp -i eno2 --dport 59200 -j DNAT --to-destination

Do I need config apache2 reverseproxy ? If I need config apache2 reverseproxy, how can I config the" apache2-public-ip"?

Thank you!

It is solved.

I install a add-on named ModHeader in microsoft edge browser,and config like this:


BUT new question is :

I resolved it with nat ufw IP Masquerading and ip redirctions + apache2 reverse proxy.

[wbe client]==[Internet]==[Nat ufw]==[Switch]==[Graylog+elasticsearch+mongodb+apache2]

graylog : public ip:9000 map / public ip:59001 map
elasticsearch: public ip:59200 map
apache2: public ip:50080 map
apache2 virtul host : MAP

First,ufw configuration paste here.

Second,I deploy graylog #47 .
juju config graylog web_endpoint_uri=http://NAT-public-ip:50080/api/

Third,ssh and config apache2.

juju ssh apache2/0
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod proxy_balancer
sudo a2enmod lbmethod_byrequests
systemctl restart apache2.service
systemctl status apache2.service
sudo a2enmod headers
systemctl restart apache2.service
systemctl status apache2.service

Fourth, delete add-on ModHeader in Microsoft Edge and web brower http://nat-public-ip:9000

It is weired.