Tutorial Anda

Tutorial Segala Ilmu Internet

Cara Konfigurasi Share Hosting Server Dengan Bind9 Apache2 di Linux Debian

Tutorial Anda, Pada Artikel yang anda baca kali ini dengan judul Cara Konfigurasi Share Hosting Server Dengan Bind9 Apache2 di Linux Debian, mudah-mudahan isi postingan Tutorial linux, yang kami sajikan ini dapat anda pahami. baiklah, selamat membaca.



Share hosting merupakan pilihan yang masuk akal bagi pengelola sebuah website terutama bagi situs yang baru belum memiliki trafik yang banyak. Share hosting memberikan sumberdaya server yang nantinya akan di pakai bersama sama dengan beberapa situs web yang memiliki 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 memakai service bersama.

Berikut ini cara konfigurasi share hosting di linux debian

1. Konfigurasi ip address, saya 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.255

2. 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.local
zone "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 baru 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 datang website1</h1>
# pico /home/website2/index.html
<h1>selamat datang website2</h1>
# pico /home/website3/index.html
<h1>selamat datang website3</h1>
19. Tambahkan user
adduser website1
adduser website2
adduser website3
20. Buka alamat domain menggunakan webbrowser.
www.website1.com
www.website2.com
www.website3.com
21. Setelah itu akan tampil halaman html yang di buat tadi, jika ingin membuat halaman website yang lebih menarik bisa di pasang sebuah CMS pada direktory html di atas.

Bagikan :
+
Previous
Next Post »
0 Komentar untuk "Cara Konfigurasi Share Hosting Server Dengan Bind9 Apache2 di Linux Debian"

 
Template By Kunci Dunia
Back To Top