Skip to content

Releases: Royhtml/Awan-Server-Host-V5

Awan V1

28 May 06:39
f25e091

Choose a tag to compare

Awan V1 Pre-release
Pre-release

🚀 PHP Server Hosting Offline (Tanpa Node.js)

awan

Host server PHP lokal lengkap dengan database MySQL dan phpMyAdmin tanpa perlu Node.js

PHP Logo
Apache
MySQL

📋 Daftar Isi

🎯 Persyaratan Sistem

Komponen Minimum Direkomendasikan
OS Windows 7/10, Linux, macOS Windows 10/11, Linux LTS
CPU Dual-core 1.5GHz Quad-core 2.4GHz+
RAM 2GB 4GB+
Storage 500MB 1GB+ SSD
PHP 7.4 8.0+

🛠 Pilihan Server PHP

🔹 XAMPP (Solusi All-in-One)

✅ Termasuk:

  • Apache 2.4.x
  • MySQL/MariaDB
  • PHP 7.x/8.x
  • phpMyAdmin
  • Perl (opsional)

🔹 Paket Terpisah

  • Apache (httpd)
  • MySQL Community Server
  • PHP (mod_php atau PHP-FPM)
  • phpMyAdmin

🔹 PHP Built-in Server

php -S localhost:8000 -t public/

💡 Catatan: Hanya untuk pengembangan, tidak untuk produksi!

📥 Instalasi XAMPP

Windows

  1. Download dari Apache Friends
  2. Jalankan installer sebagai Administrator
  3. Pilih komponen:
    [X] Apache
    [X] MySQL
    [X] PHP
    [X] phpMyAdmin
    
  4. Instal ke C:\xampp (default)

Linux (Debian/Ubuntu)

sudo apt update && sudo apt upgrade -y
sudo apt install apache2 mariadb-server php libapache2-mod-php php-mysql phpmyadmin

macOS

brew install php
brew install mysql
brew install phpmyadmin

⚙️ Konfigurasi Dasar

File Penting XAMPP:

  • \xampp\php\php.ini (Konfigurasi PHP)
  • \xampp\apache\conf\httpd.conf (Konfigurasi Apache)
  • \xampp\mysql\bin\my.ini (Konfigurasi MySQL)

Optimasi PHP (php.ini):

memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 128M
max_execution_time = 180

🐘 PHP Built-in Server

Start Server:

php -S 0.0.0.0:8080 -t ./public

Dengan Router Script:

php -S localhost:8000 router.php

Conten router.php:

<?php
$path = pathinfo($_SERVER["SCRIPT_FILENAME"]);
if ($path["extension"] == "php") {
    include $_SERVER["SCRIPT_FILENAME"];
} else {
    return false;
}
?>

🗃 Hosting phpMyAdmin

Struktur Direktori:

/htdocs
  /phpmyadmin
    config.inc.php
    index.php

Konfigurasi Keamanan (config.inc.php):

$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['blowfish_secret'] = 'k5D!9gH#2pL@8sQ$1mVnZoY7xW*4eT6r';
$cfg['ForceSSL'] = true;

🔒 Keamanan Server

1. Proteksi MySQL

-- Buat user baru
CREATE USER 'devuser'@'localhost' IDENTIFIED BY 'StrongPassword123!';
GRANT ALL PRIVILEGES ON *.* TO 'devuser'@'localhost';
FLUSH PRIVILEGES;

2. .htaccess untuk phpMyAdmin

AuthType Basic
AuthName "Admin Area"
AuthUserFile /path/to/.htpasswd
Require valid-user

Buat password:

htpasswd -c /etc/apache2/.htpasswd admin

🌐 Sharing ke Jaringan Lokal

1. Cek IP Address

ipconfig (Windows)
ifconfig (Linux/macOS)

2. Konfigurasi Apache

Edit httpd.conf:

Listen 192.168.1.100:80
ServerName 192.168.1.100:80

3. Izinkan di Firewall

sudo ufw allow 80/tcp

🚨 Troubleshooting

Port 80 Terpakai

netstat -ano | findstr :80  # Windows
sudo lsof -i :80           # Linux/macOS

MySQL Tidak Start

  1. Cek error log:
    /xampp/mysql/data/mysql_error.log
    
  2. Repair database:
    mysqlcheck --all-databases --repair -u root -p

📚 Referensi


Dibuat dengan ❤️ oleh dwi bakti n dev | GitHub

Fitur Tambahan yang Dicover:

  1. Badges untuk teknologi utama
  2. Tabel spesifikasi sistem
  3. Diagram alur instalasi
  4. Kode blok dengan sintaks highlighting
  5. Ikon visual untuk setiap bagian
  6. Catatan penting dalam kotak terpisah
  7. Referensi eksternal yang relevan
  8. Footer dengan informasi kontributor

Anda bisa menyesuaikan:

  • Nama dan link GitHub di footer
  • Versi software sesuai kebutuhan
  • Konfigurasi spesifik untuk proyek Anda
  • Gambar/screenshot tambahan jika diperlukan