Cara Konfigurasi Share Hosting Server Dengan Bind9 Apache2 Di Linux Debian
Share hosting merupakan pilihan yang masuk logika bagi pengelola sebuah website terutama bagi situs yang gres belum mempunyai trafik yang banyak. Share hosting memperlihatkan sumberdaya server yang nantinya akan di pakai bersama sama dengan beberapa situs web yang mempunyai layanan yang sama. Masing masing share hosting akan di berikan sebuah acount layanan hosting yang di letakkan bersama sama ke beberapa acount dalam server yang sama dalam kinerjanya akan menggunakan service bersama.
Berikut ini cara konfigurasi share hosting di linux debian
1. Konfigurasi ip address, aku menggunakan ip alias
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 10.10.10.1 netmask 255.255.255.0 network 10.10.10.0 broadcast 10.10.10.255 gateway 10.10.10.254 auto eth0:0 iface eth0:0 inet static address 10.10.10.2 netmask 255.255.255.0 network 10.10.10.0 broadcast 10.10.10.255 auto eth0:1 iface eth0:1 inet static address 10.10.10.3 netmask 255.255.255.0 nektwork 10.10.10.0 broadcast 10.10.10.255 auto eth1 iface eth1 inet static address 192.168.100.1 netmask 255.255.255.0 network 192.168.100.0 broadcast 192.168.100.2552. Restart network
#/etc/init.d/networking restart 3. Install packet pendukung#apt-get install php5 bind9 dnsutils apache2 4. Pindah directory bind#cd /etc/bind 5. Konfigurasi file named.conf.localzone "website1.com" { type master; file "/etc/bind/db.website1"; }; zone "website2.com" { type master; file "/etc/bind/db.website2"; }; zone "website3.com" { type master; file "/etc/bind/db.website3"; }; zone "10.10.10.in-addr.arpa" { type master; file "/etc/bind/db.10"; };6. Copykan beberapa file konfigurasi diantaranya
cp db.127 db.10 cp db.local db.website1 cp db.local db.website2 cp db.local db.website3
7. Konfigurasi file db.website1
; ; BIND data file for local loopback interface ; $TTL 604800 @ IN SOA website1.com. root.website1.com. ( 2 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; @ IN NS website1.com. @ IN A 10.10.10.1 www IN A 10.10.10.1 8. Konfigurasi file db.website2
; ; BIND data file for local loopback interface ; $TTL 604800 @ IN SOA website2.com. root.website2.com. ( 2 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; @ IN NS website2.com. @ IN A 10.10.10.2 www IN A 10.10.10.2 9. Konfigurasi file db.website3
; ; BIND data file for local loopback interface ; $TTL 604800 @ IN SOA website3.com. root.website3.com. ( 2 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; @ IN NS website3.com. @ IN A 10.10.10.3 www IN A 10.10.10.3 10. Konfigurasi file db.10
; ; BIND reverse data file for local loopback interface ; $TTL 604800 @ IN SOA website1.com. root.website1.com. ( 1 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; @ IN NS website1.com. 1 IN PTR website1.com. 2 IN PTR website2.com. 3 IN PTR website3.com. 11. Konfigurasi file /etc/resolv.conf
nameserver 10.10.10.1 nameserver 10.10.10.2 nameserver 10.10.10.3 12. Restart bind9 dan cek hasil konfigurasi dengan perintah dig atau nslookup
/etc/init.d/bind9 restart # dig website1.com # dig website2.com # dig website3.com 13. Pindah directory ke /etc/apache2/sites-available
cd /etc/apache2/sites-available cp 000-default.conf 000-website1.conf cp 000-default.conf 000-website2.conf cp 000-default.conf 000-website3.conf 14. pico 000-website1.conf
Edit baris berikut ini
ServerName www.website1.com ServerAlias website1.com ServerAdmin webmaster@localhost DocumentRoot /home/website1 <Directory /home/website1/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> 15. pico 000-website2.conf
Edit baris berikut ini
ServerName www.website2.com ServerAlias website2.com ServerAdmin webmaster@localhost DocumentRoot /home/website2 <Directory /home/website2/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> 16. pico 000-website3.conf
Edit baris berikut ini
ServerName www.website3.com ServerAlias website3.com ServerAdmin webmaster@localhost DocumentRoot /home/website3 <Directory /home/website3/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>17. Disable Virtualhost default dan enable Virtualhost yang gres di buat
Masuk ke console ketikan perintah berikut ini
# a2dissite 000-default.conf # a2ensite 000-website1.conf # a2ensite 000-website2.conf # a2ensite 000-website3.conf # /etc/init.d/apache2 reload # /etc/init.d/apache2 restart
18. Membuat halaman index.html pada masing masing direktory
# mkdir /home/website1 # mkdir /home/website2 # mkdir /home/website3 # pico /home/website1/index.html
<h1>selamat tiba website1</h1>
# pico /home/website2/index.html
<h1>selamat tiba website2</h1>
# pico /home/website3/index.html
<h1>selamat tiba website3</h1>
adduser website1 adduser website2 adduser website320. Buka alamat domain menggunakan webbrowser.
www.website1.com www.website2.com www.website3.com21. Setelah itu akan tampil halaman html yang di buat tadi, jikalau ingin menciptakan halaman website yang lebih menarik dapat di pasang sebuah CMS pada direktory html di atas.

0 Response to "Cara Konfigurasi Share Hosting Server Dengan Bind9 Apache2 Di Linux Debian"
Posting Komentar