Berikut Konfigurasinya :
3 server
1. www.tkj.net = 192.168.122.10 (access client)
= 192.168.43.100 (line to node)
2. node1= 192.168.43.101 (node1)
3. node2= 192.168.43.102 (node2)
- configure DNS for www.tkj.net in server control
- node1 install httpd
- node2 install httpd
configure load balance in server control
## back repo to internet ###
[root@control ~]# cd /etc/yum.repos.d/
[root@control yum.repos.d]# mv CentOS-Base.repo.backup CentOS-Base.repo
[root@control yum.repos.d]# mv CentOS-Sources.repo.backup CentOS-Sources.repo
## install epel repo ##
[root@control yum.repos.d]# yum install epel-release -y
## install paket Pound ##
[root@control yum.repos.d]# yum install Pound
## Configure Pound ##
[root@control yum.repos.d]# nano /etc/pound.cfg
----------------------------------------------------------------------------------------
ListenHTTP
Address 192.168.122.10
Port 80
End
#ListenHTTPS
# Address 0.0.0.0
# Port 443
# Cert "/etc/ssl/pound.pem"
#End
Service
BackEnd
Address 192.168.43.101
Port 80
End
BackEnd
Address 192.168.43.102
Port 80
End
End
----------------------------------------------------------------------------------------
## restart pound ##
[root@control yum.repos.d]# systemctl start pound.service
## add firewall in controller pound ##
[root@control yum.repos.d]# firewall-cmd --permanent --add-service=http
[root@control yum.repos.d]# firewall-cmd --reload
----------------------------------------------------------------------------------------
akses situs http://www.tkj.net/
pastikan web server bisa terbuka di client dan klik refresh berulang2 untuk melihat perubahannya. lalu bagaimana jika kita menggunakan https untuk itu kita harus mengaktifkan https pada file pound.cfg di server controller akan tetapi kita buat dulu ssl yang akan digunakan untuk https pound
----------------------------------------------------------------------------------------
[root@control yum.repos.d]#cd /etc/ssl
[root@control ssl]# openssl req -x509 -newkey rsa:1024 -keyout pound.pem -out pound.pem -days 365 -nodes
----------------------------------------------------------------------------------------
Generating a 1024 bit RSAprivate key
.......++++++ .................................................++++++
Country Name (2 letter code) [XX]:ID
State or Province Name (full name) []:Jawa Barat
Locality Name (eg, city) [Default City]:Bekasi
Organization Name (eg, company) [Default Company Ltd]:SMKN 1
Organizational Unit Name (eg, section) []:TKJ
Common Name (eg, your name or your server's hostname) []:control.tkj
EmailAddress []:daynet.net@gmail.com
----------------------------------------------------------------------------------------
## Configure Pound ##
[root@control ssl]# nano /etc/pound.cfg
ListenHTTPS
Address 192.168.122.10
Port 443
Cert "/etc/ssl/pound.pem"
End
---------------------------------------------------------------------------------------
## restart pound ##
[root@control ssl]# systemctl restart pound.service
## add firewall in controller pound ##
[root@control ssl]# firewall-cmd --permanent --add-service=https
[root@control ssl]# firewall-cmd --reload
----------------------------------------------------------------------------------------
akses situs https://www.tkj.net/
pastikan web yang diakses berubah dengan menekan tombol refresh berulang2 dengan menggunakan https pada server pound
Semoga Bermanfaat :)
No comments:
Post a Comment