lsb_release -cd; getconf LONG_BIT; hostname; hostname -I
apt update; apt upgrade -y
apt install snapd nginx -y; snap install rocketchat-server
systemctl start nginx; systemctl enable nginx
netstat -tlpn
nano /etc/nginx/conf.d/rocketchat-server.conf
server {
listen 80;
server_name www.testdomain.com;
location / {
proxy_pass
127.0.0.1:3000;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
nginx -t; netstat -tlpn | grep 3000; hostname -I; systemctl restart nginx
sudo -- sh -c "echo 192.168.9.11 www.testdomain.com >> /etc/hosts"
go to web browser url:
www.testdomain.com or localhost: 192.168.1.204:3000