Redirect port 80 to 3000 for Grafana
This commit is contained in:
parent
4977de1d33
commit
bdc50ad703
1 changed files with 2 additions and 2 deletions
|
@ -1,10 +1,10 @@
|
||||||
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
|
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
|
||||||
echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
|
echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y grafana
|
apt-get install -y grafana iptables
|
||||||
|
|
||||||
cp grafana.ini /etc/grafana/grafana.ini
|
cp grafana.ini /etc/grafana/grafana.ini
|
||||||
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3000
|
iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3000
|
||||||
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable grafana-server
|
systemctl enable grafana-server
|
||||||
|
|
Loading…
Reference in a new issue