logotype
  • Home
  • News
  • Product dan Services
    • Zimbra Mail Server
      • Excellent Managed Services Email
      • Lisensi Zimbra NE
      • Support dan Maintenance
      • MX Backup & ASAV
      • SMTP Relay
    • Proxmox
      • Proxmox Virtual Environment
      • Proxmox Mail Gateway
      • Proxmox Backup Server
    • XCP-ng
    • Red Hat Enterprise Linux
    • Ubuntu Pro
    • Nakivo Backup & Recovery
    • Vinchin Backup & Recovery
    • Lisensi
      • Proxmox Mail Gateway
      • Lisensi Zimbra Network Edition
      • Lisensi Nakivo Backup & Recovery
      • Subscription Zoom
    • Buku Training Mandiri
      • Buku Training Mandiri
      • Ebook Training Mandiri
    • Cloud & Hosting
      • Excellent Managed Services Email Server
      • MX Backup/Anti Spam & Anti Virus
      • SMTP Relay & Mail Gateway
      • Excellent Mail Hosing
    • SSL Sertifikat
  • Training
  • Insight
  • About Us
  • Contacts
logotype
logotype
  • Home
  • News
  • Product dan Services
    • Zimbra Mail Server
      • Excellent Managed Services Email
      • Lisensi Zimbra NE
      • Support dan Maintenance
      • MX Backup & ASAV
      • SMTP Relay
    • Proxmox
      • Proxmox Virtual Environment
      • Proxmox Mail Gateway
      • Proxmox Backup Server
    • XCP-ng
    • Red Hat Enterprise Linux
    • Ubuntu Pro
    • Nakivo Backup & Recovery
    • Vinchin Backup & Recovery
    • Lisensi
      • Proxmox Mail Gateway
      • Lisensi Zimbra Network Edition
      • Lisensi Nakivo Backup & Recovery
      • Subscription Zoom
    • Buku Training Mandiri
      • Buku Training Mandiri
      • Ebook Training Mandiri
    • Cloud & Hosting
      • Excellent Managed Services Email Server
      • MX Backup/Anti Spam & Anti Virus
      • SMTP Relay & Mail Gateway
      • Excellent Mail Hosing
    • SSL Sertifikat
  • Training
  • Insight
  • About Us
  • Contacts
logotype
  • Home
  • News
  • Product dan Services
    • Zimbra Mail Server
      • Excellent Managed Services Email
      • Lisensi Zimbra NE
      • Support dan Maintenance
      • MX Backup & ASAV
      • SMTP Relay
    • Proxmox
      • Proxmox Virtual Environment
      • Proxmox Mail Gateway
      • Proxmox Backup Server
    • XCP-ng
    • Red Hat Enterprise Linux
    • Ubuntu Pro
    • Nakivo Backup & Recovery
    • Vinchin Backup & Recovery
    • Lisensi
      • Proxmox Mail Gateway
      • Lisensi Zimbra Network Edition
      • Lisensi Nakivo Backup & Recovery
      • Subscription Zoom
    • Buku Training Mandiri
      • Buku Training Mandiri
      • Ebook Training Mandiri
    • Cloud & Hosting
      • Excellent Managed Services Email Server
      • MX Backup/Anti Spam & Anti Virus
      • SMTP Relay & Mail Gateway
      • Excellent Mail Hosing
    • SSL Sertifikat
  • Training
  • Insight
  • About Us
  • Contacts
Blog Post
BlogBlog & ResourcesProduct & ServicesSSL

Instalasi SSL di HAProxy untuk Reverse Proxy Web Server (Single Server)

July 29, 2025by Zaidan

HAProxy adalah salah satu solusi yang dapat digunakan untuk mengelola trafik HTTP/HTTPS. Salah satu skenario umum implementasi HAProxy adalah sebagai SSL temination point, di mana koneksi HTTPS dari klien diproses oleh HAProxy sebelum diteruskan ke web server melalui koneksi HTTP.

Pada tulisan kali ini, kami akan membahas mengenai langkah-langkah instalasi sertifikat SSL di HAProxy.

Persiapan

Skenario yang digunakan dalam pengujian kali ini adalah:

  • HAProxy bertugas untuk menerima koneksi HTTPS dari klien
  • Trafik dari klien diteruskan dalam bentuk HTTP ke web server (misalnya NGINX)

Ilustrasi:
image host

Persiapkan juga file SSL:

  • Private key
  • Sertifikat SSL
  • CA Bundle

Ketiga file tersebut digabungkan menjadi satu file .pem. Urutan (dan perintahnya) adalah sebagai berikut:

cat private.key SSL.crt ca_bundle.crt > commercial.pem

(sesuaikan nama file dan direktorinya). Pastikan juga file .pem yang dibuat memiliki hak akses yang aman (hanya dapat diakses oleh user yang menjalankan HAProxy).

Konfigurasi HAProxy

File konfigurasi HAProxy biasanya terletak di:

/etc/haproxy/haproxy.cfg

Sesuaikan konfigurasi global untuk mendefinisikan versi TLS dan juga cipher suite-nya:

global
    ssl-default-bind-options ssl-min-ver TLSv1.2
    ssl-default-bind-ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384

ssl-default-bind-options ssl-min-ver TLSv1.2: mendefinisikan koneksi yang dapat diterima adalah koneksi dengan TLS minimal v1.2

ssl-default-bind-ciphers...: mendefinisikan versi cipher suite untuk proses “negosiasi” SSL.

Sesuaikan konfigurasinya pada file haproxy.cfg

listen https_frontend
bind *:8443 ssl crt /etc/haproxy/ssl/commercial.pem
option tcp-check
tcp-check connect
http-request redirect scheme https unless { ssl_fc }
http-request set-header X-Forwarded-For %[src] http-request set-header X-Forwarded-Proto https if { ssl_fc }
http-request set-var(txn.request_host_header) req.hdr(Host)
server web_backend 192.168.9.3:8080

Pada bagian frontend, digunakan untuk membuat blok konfigurasi untuk menerima trafik dari luar dan meneruskannya ke backend.

bind *:8443 ssl crt /etc/haproxy/ssl/commercial.pem: Port yang digunakan untuk SSL adalah port 8443 dan juga mengarahkan ke file commercial.pem

Parameter lainnya digunakan untuk redirect koneksi HTTP ke HTTPS, memastikan backend mengetahui koneksi dari klien, menginformasikan ke backend bahwa koneksi awal menggunakan HTTPS, dan juga mendefinisikan alamat IP backend dari web server.

Validasi Konfigurasi

Sebelum menerapkan perubahan (restart HAProxy), lakukan validasi konfigurasi HAProxy dengan menggunakan perintah berikut:

haproxy -c -f /etc/haproxy/haproxy.cfg

Apabila tidak ditemukan error, lanjutkan dengan restart HAProxy-nya.

systemctl restart haproxy

Pengujian

Setelah HAProxy direstart:

  • Akses domain melalui web browser dengan protokol HTTPS
  • Pastikan koneksi aman (HTTPS aktif dan ikon gembok muncul di address bar)
  • Apabila sertifikat SSL valid dan tidak ada error, konten dari backend web server akan muncul.

Penutup

Dengan menggunakan HAProxy sebagai SSL endpoint, ada beberapa keuntungan yang bisa didapatkan:

  • Arsitektur web lebih modular
  • Pemrosesan SSL terpusat
  • Pengurangan beban kerja (untuk dekripsi koneksi HTTPS) di sisi backend server
  • Skalabilitas dan fleksibilitas lebih tinggi.

Jika perusahaan Anda memerlukan pengadaan SSL komersial beserta dukungan teknisnya, hubungi tim sales kami melalui sales@excellent.co.id .

AboutMuhammad Zaidan
IT Support for PT Excellent Infotama Kreasindo | Certified Nakivo Technical & Sales Professional | In charge of Excellent Managed Services (EMS), Proxmox and Nakivo
Prev

Instalasi SSL di Apache Web Server

Next

Instalasi SSL pada Microsoft IIS

Related Posts

BlogBlog & Resources
March 17, 2016

Mundur Selangkah dan Maju Kembali – Bagian 1

Read more
ResourceVMWare
March 20, 2012

Tips Memindahkan Mesin Fisik ke Virtual Machine (P2V) Menggunakan VMWare Converter-Bagian 1

Read more
Zemanta Related Posts Thumbnail
EventScheduleTrainingVMWare
September 16, 2013

Training VMware vSphere Fundamental & Medium (High Availability), 26-27 Oktober 2013

Read more

Leave a Reply

Your email address will not be published. Required fields are marked *

Search
Recent Post
  • Zimbra Daffodil 10.1.16 Rilis: Modern Web App Makin Cerdas, Backup Lebih Hemat Storage, dan Peningkatan Keamanan
  • Live Migration vs High Availability di XCP-ng: Perbedaan dan Skenario Penggunaan
  • Informasi untuk Pelanggan PT. Excellent Infotama Kreasindo : Penyesuaian Kebijakan Masa Berlaku Sertifikat SSL/TLS Menuju Standar Keamanan Global
  • Excellent Infotama Kreasindo: Lingkungan Kerja yang Memberi Ruang untuk Bertumbuh
  • Segudang Benefit dari Dana Buffer: Ketika Kebijakan Berangkat dari Pengalaman
Categories
Archives
Featured image: Instalasi SSL di HAProxy untuk Reverse Proxy Web Server (Single Server)
Get in Touch

KATEGORI

  • Home
  • Artikel
  • Jadwal
  • Event
  • Berita

LAYANAN

  • Zimbra Mail Server
  • Ubuntu
  • XCP-ng
  • Vinchin
  • ASAV
  • Proxmox
  • RHEL
  • Nakivo
  • SMTP Relay
  • SSL Certificate

KONTAK KAMI

PT. Excellent Infotama Kreasindo, Premier Serenity Blok J12, Jl. KH. Agus Salim No. 40E, Bekasi Jaya, Bekasi Timur, Bekasi 17112, Jawa Barat, Indonesia

TENTANG KAMI

PT. Excellent Infotama Kreasindo merupakan entitas bisnis yang fokus pada layanan komputerisasi seperti implementasi sistem, konsultasi, training/workshop, dan maintenance sistem, terutama migrasi dari sistem Windows ke Linux. more…