Lewati ke konten

Instalasi Manual — Windows (XAMPP)

Clone ILDIS ke dalam folder htdocs:

Terminal window
cd C:\xampp\htdocs
git clone https://github.com/bphndigitalservice/ildis.git ildis

Atau ekstrak file rilis dari GitHub Releases

Terminal window
cd C:\xampp\htdocs\ildis
composer install
php init
Terminal window
copy .env.example .env

Edit file .env dan sesuaikan nilai dengan kredensial MySQL / MariaDB Anda.

Buat database terlebih dahulu. Buka MySQL command line atau gunakan phpMyAdmin:

Terminal window
mysql -u root -e "CREATE DATABASE ildis_v4;"

Lalu jalankan migrasi:

Terminal window
php yii migrate

Edit file C:\xampp\apache\conf\extra\httpd-vhosts.conf, tambahkan:

httpd-vhosts.conf
<VirtualHost *:80>
#ganti dengan domain anda
ServerName ildis-demo.bphn.go.id
#ErrorLog /var/log/apache2/advanced.local.error.log
#CustomLog /var/log/apache2/advanced.local.access.log combined
AddDefaultCharset UTF-8
Options FollowSymLinks
DirectoryIndex index.php index.html
RewriteEngine on
RewriteRule /\. - [L,F]
DocumentRoot /var/www/ildis/
<Directory /var/www/ildis/>
AllowOverride none
<IfVersion < 2.4>
Order Allow,Deny
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
# if a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward the request to index.php
RewriteRule ^ index.php [L]
</Directory>
# redirect to the URL without a trailing slash (uncomment if necessary)
#RewriteRule ^/admin/$ /admin [L,R=301]
Alias /admin /var/www/ildis/backend/
# prevent the directory redirect to the URL with a trailing slash
RewriteRule ^/admin$ /admin/ [L,PT]
<Directory /var/www/ildis/backend/>
AllowOverride none
<IfVersion < 2.4>
Order Allow,Deny
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
# if a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward the request to index.php
RewriteRule ^ index.php [L]
</Directory>
</VirtualHost>

Edit file hosts:

hosts
C:\Windows\System32\drivers\etc\hosts

Tambahkan baris berikut:

hosts
127.0.0.1 ildis-frontend.test ildis-backend.test

Restart Apache dari XAMPP Control Panel.


Setelah instalasi berhasil, lanjutkan ke halaman berikut untuk konfigurasi awal: