Konfigurasi Web server Menggunakan Wordpress Dan SSL
# Langkah-Langkah Membuat Web Server Dengan Keamanan SSL Serta Pengambilan Konten Dari WordPress
**Mei 06, 2026**
Pada kesempatan kali ini saya akan membagikan langkah-langkah membuat sebuah web server menggunakan sistem operasi Debian dengan web server Apache HTTP Server, database server MariaDB, serta menggunakan WordPress sebagai aplikasi berbasis web. Selain itu website juga akan diamankan menggunakan SSL (HTTPS) agar koneksi client ke server menjadi lebih aman.
---
# 1. Update Server Debian
Sebelum memulai konfigurasi web server, lakukan update package dan repository terlebih dahulu.
```bash id="avh4mb"
apt update && apt upgrade -y
```
---
# 2. Install Apache2 (Web Server)
Install Apache2 sebagai web server utama.
```bash id="7odw1v"
apt install apache2 -y
```
Cek apakah service Apache berjalan:
```bash id="9wjafn"
systemctl status apache2
```
Lalu lakukan pengujian di browser menggunakan IP server:
```text id="q51jlwm"
http://IP-server
```
> Pastikan mengetahui IP server terlebih dahulu sebelum melakukan pengujian melalui browser.
---
# 3. Install Database Server
Install MariaDB sebagai database server.
```bash id="6jlwmh"
apt install mariadb-server -y
```
Kemudian amankan database:
```bash id="8s0cgz"
mariadb-secure-installation
```
---
# 4. Install PHP
Karena WordPress menggunakan PHP, maka kita perlu menginstall PHP beserta modul pendukungnya.
```bash id="w3k4rn"
apt install php php-mysql php-curl php-gd php-mbstring php-xml php-zip -y
```
Restart Apache2:
```bash id="9phv62"
systemctl restart apache2
```
---
# 5. Membuat Database WordPress
Masuk ke MariaDB:
```bash id="7s0x6q"
mysql -u root -p
```
Lalu buat database WordPress beserta usernya:
```sql id="b6gh4l"
CREATE DATABASE wordpress_db;
CREATE USER 'wpuser'@'localhost' IDENTIFIED BY '12345';
GRANT ALL PRIVILEGES ON wordpress_db.* TO 'wpuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
```
---
# 6. Download WordPress
Masuk ke folder web server:
```bash id="0sxkkm"
cd /var/www/html
```
Download WordPress:
```bash id="vr4w6d"
wget https://wordpress.org/latest.zip
```
Install unzip dan extract file WordPress:
```bash id="n0nqjn"
apt install unzip -y
unzip latest.zip
```
Folder WordPress nantinya berada di:
```text id="ylr4lw"
/var/www/html/wordpress
```
---
# 7. Mengatur Permission Folder WordPress
Atur permission agar Apache dapat membaca folder WordPress.
```bash id="4cz9ji"
chown -R www-data:www-data /var/www/html/wordpress
chmod -R 755 /var/www/html/wordpress
```
---
# 8. Install WordPress Melalui Browser
Buka browser lalu akses:
```text id="m3l8mf"
http://IP-server/wordpress
```
Isi konfigurasi database:
```text id="6yptow"
Database Name : wordpress_db
Username : wpuser
Password : 12345
Host : localhost
```
Setelah itu buat:
* Nama website
* Username admin
* Password admin
Jika berhasil maka WordPress telah selesai diinstall.
---
# 9. Install Theme WordPress
Login ke dashboard WordPress:
```text id="yy8n2m"
http://IP-server/wordpress/wp-admin
```
Masuk ke menu:
```text id="c6c10j"
Appearance → Themes → Add New
```
Pilih tema website sesuai keinginan masing-masing. Tema juga dapat dikustomisasi kembali agar tampilan website menjadi lebih menarik.
Untuk membuka website yang sudah menggunakan tema tersebut:
```text id="r7b3nq"
http://IP-server/wordpress
```
---
# 10. Install SSL (HTTPS)
Install Certbot:
```bash id="8s9y8w"
apt install certbot python3-certbot-apache -y
```
Aktifkan modul SSL Apache:
```bash id="o5gvch"
/usr/sbin/a2enmod ssl
```
Buat sertifikat SSL self-signed:
```bash id="hhqezd"
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout /etc/ssl/private/apache-selfsigned.key \
-out /etc/ssl/certs/apache-selfsigned.crt
```
---
# 11. Membuat VirtualHost HTTPS
Buat file konfigurasi HTTPS:
```bash id="2b25r3"
nano /etc/apache2/sites-available/wordpress-ssl.conf
```
Isi konfigurasi berikut:
```apache id="tf94rx"
<VirtualHost *:443>
ServerAdmin admin@localhost
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
</VirtualHost>
```
Aktifkan VirtualHost SSL:
```bash id="gmdjlwm"
/usr/sbin/a2ensite wordpress-ssl
```
Reload Apache:
```bash id="q3p4v6"
systemctl reload apache2
```
---
# 12. Pengujian HTTPS
Buka browser lalu akses:
```text id="7cp8zj"
https://IP-server
```
Jika browser menampilkan warning keamanan, pilih:
```text id="p9mjlwm"
Advanced
→ Accept the Risk and Continue
```
Karena sertifikat yang digunakan masih berupa self-signed certificate.
---
# 13. Pengujian Client
Langkah terakhir yaitu melakukan pengujian dari client lain yang masih berada dalam satu jaringan.
Buka browser client lalu akses:
```text id="9mjlwm"
https://IP-server/wordpress
```
Jika website berhasil tampil beserta tema WordPress yang telah dipilih, maka web server dengan keamanan SSL berhasil dibuat dan dapat diakses melalui jaringan lokal.
---
# Penutup
Dengan selesainya langkah-langkah di atas, saya berhasil membuat sebuah web server menggunakan:
* Debian
* Apache HTTP Server
* MariaDB
* WordPress
serta berhasil mengimplementasikan HTTPS menggunakan SSL self-signed certificate agar koneksi client ke server menjadi lebih aman.
Comments
Post a Comment