Difference between revisions of "Mirror Web Internet menjadi Web Lokal"
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
(12 intermediate revisions by 2 users not shown) | |||
Line 45: | Line 45: | ||
==Edit Konfigurasi Apache== | ==Edit Konfigurasi Apache== | ||
− | edit file /etc/apache2/ports.conf hapus kalimat 'NameVirtualHost *:80' | + | edit file |
+ | |||
+ | # vi /etc/apache2/ports.conf | ||
+ | |||
+ | hapus kalimat | ||
+ | |||
+ | 'NameVirtualHost *:80' | ||
Selanjutnya, edit | Selanjutnya, edit | ||
Line 54: | Line 60: | ||
NameVirtualHost *:80 | NameVirtualHost *:80 | ||
+ | |||
+ | <VirtualHost *:80> | ||
+ | ServerAdmin webmaster@localhost | ||
+ | ServerName www.ipl.org | ||
+ | DocumentRoot /mirror/www.ipl.org | ||
+ | <Directory /mirror/www.ipl.org > | ||
+ | Options Indexes FollowSymLinks MultiViews | ||
+ | AllowOverride None | ||
+ | Order allow,deny | ||
+ | allow from all | ||
+ | </Directory> | ||
+ | </VirtualHost> | ||
+ | |||
+ | <VirtualHost *:80> | ||
+ | ServerAdmin webmaster@localhost | ||
+ | ServerName ocw.mti.edu | ||
+ | DocumentRoot /mirror/ocw.mit.edu | ||
+ | <Directory /mirror/ocw.mit.edu > | ||
+ | Options Indexes FollowSymLinks MultiViews | ||
+ | AllowOverride None | ||
+ | Order allow,deny | ||
+ | allow from all | ||
+ | </Directory> | ||
+ | </VirtualHost> | ||
+ | |||
+ | <VirtualHost *:80> | ||
+ | ServerAdmin webmaster@localhost | ||
+ | ServerName www.itb.ac.id | ||
+ | DocumentRoot /mirror/www.itb.ac.id | ||
+ | <Directory /mirror/www.itb.ac.id > | ||
+ | Options Indexes FollowSymLinks MultiViews | ||
+ | AllowOverride None | ||
+ | Order allow,deny | ||
+ | allow from all | ||
+ | </Directory> | ||
+ | </VirtualHost> | ||
<VirtualHost *:80> | <VirtualHost *:80> | ||
ServerAdmin webmaster@localhost | ServerAdmin webmaster@localhost | ||
− | ServerName www. | + | ServerName www.stkipsurya.ac.id |
− | DocumentRoot /mirror/ | + | DocumentRoot /mirror/www.stkipsurya.ac.id |
− | <Directory /mirror/> | + | <Directory /mirror/www.stkipsurya.ac.id > |
+ | Options Indexes FollowSymLinks MultiViews | ||
+ | AllowOverride None | ||
+ | Order allow,deny | ||
+ | allow from all | ||
+ | </Directory> | ||
+ | </VirtualHost> | ||
+ | |||
+ | <VirtualHost *:80> | ||
+ | ServerAdmin webmaster@localhost | ||
+ | ServerName www.ui.ac.id | ||
+ | DocumentRoot /mirror/www.ui.ac.id | ||
+ | <Directory /mirror/www.ui.ac.id > | ||
Options Indexes FollowSymLinks MultiViews | Options Indexes FollowSymLinks MultiViews | ||
AllowOverride None | AllowOverride None | ||
Line 65: | Line 119: | ||
allow from all | allow from all | ||
</Directory> | </Directory> | ||
− | </VirtualHost | + | </VirtualHost> |
+ | |||
+ | Jangan lupa restart [[apache]] | ||
+ | |||
+ | /etc/init.d/apache2 restart | ||
+ | |||
+ | ==Konfigurasi sebuah Client / PC== | ||
+ | |||
+ | paling gampang kita mengedit [[komputer]] client dan mengubah file | ||
+ | |||
+ | /etc/hosts | ||
+ | |||
+ | dengan menambahkan misalnya | ||
+ | |||
+ | 192.168.0.66 ocw.mit.edu | ||
+ | 192.168.0.66 www.ipl.org | ||
+ | 192.168.0.66 www.itb.ac.id | ||
+ | 192.168.0.66 www.stkipsurya.ac.id | ||
+ | 192.168.0.66 www.ui.ac.id | ||
+ | |||
+ | dengan asumsi | ||
+ | |||
+ | * server menggunakan [[IP address]] 192.168.0.66 | ||
− | == | + | ==Konfigurasi di LAN lokal== |
+ | ===DHCP Server di LAN=== | ||
+ | ===DNS Server di LAN=== | ||
+ | ==Referensi== | ||
+ | * http://fosswire.com/post/2008/04/create-a-mirror-of-a-website-with-wget/ | ||
==Pranala Menarik== | ==Pranala Menarik== |
Latest revision as of 15:54, 8 May 2012
Pada saat semua situs yang kita butuhkan ada copy-nya di harddisk. Pada saat itu, Internet akan terasa cepat! Berikut adalah usaha untuk membuat supaya Internet menjadi cepat dengan cara mengcopy situs-situs yang bermanfaat ke harddisk lokal walaupun akses melalui web biasa.
Siapkan Folder tempat penyimpanan situs
sudo su mkdir /mirror chown -Rf www-data.www-data /mirror chmod -Rf 777 /mirror
Siapkan Script untuk Download Web
Siapkan script edit file misalnya
touch /usr/local/bin/mirrorbanyakweb.sh chmod -Rf 777 /usr/local/bin/mirrorbanyakweb.sh vi /usr/local/bin/mirrorbanyakweb.sh
isi dengan situs yang ingin anda download
cd /mirror wget -c --level=1 --limit-rate=8K -r -p -U Mozilla http://www.ipl.org/ wget -c --level=1 --limit-rate=8K -r -p -U Mozilla http://ocw.mit.edu/ wget -c --level=1 --limit-rate=8K -r -p -U Mozilla http://www.itb.ac.id/ wget -c --level=1 --limit-rate=8K -r -p -U Mozilla http://www.stkipsurya.ac.id/ wget -c --level=1 --limit-rate=8K -r -p -U Mozilla http://www.ui.ac.id/ chown -Rf www-data.www-data /mirror chmod -Rf 777 /mirror
Setelah di save sebaiknya di test dan pastikan tidak ada error dengan perintah
/usr/local/bin/mirrorbanyakweb.sh
Konfigusi cron
Edit cron
crontab -e
Isi misalnya dengan
0 19 * * * /usr/local/bin/mirrorbanyakweb.sh
agar secara periodik web yang ingin di mirror akan di update isinya.
Edit Konfigurasi Apache
edit file
# vi /etc/apache2/ports.conf
hapus kalimat
'NameVirtualHost *:80'
Selanjutnya, edit
# vi /etc/apache2/sites-enabled/000-default
Tambahan entry untuk masing-masing mesin / host kira-kira sebagai berikut
NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName www.ipl.org DocumentRoot /mirror/www.ipl.org <Directory /mirror/www.ipl.org > Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> </VirtualHost>
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName ocw.mti.edu DocumentRoot /mirror/ocw.mit.edu <Directory /mirror/ocw.mit.edu > Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> </VirtualHost>
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName www.itb.ac.id DocumentRoot /mirror/www.itb.ac.id <Directory /mirror/www.itb.ac.id > Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> </VirtualHost>
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName www.stkipsurya.ac.id DocumentRoot /mirror/www.stkipsurya.ac.id <Directory /mirror/www.stkipsurya.ac.id > Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName www.ui.ac.id DocumentRoot /mirror/www.ui.ac.id <Directory /mirror/www.ui.ac.id > Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> </VirtualHost>
Jangan lupa restart apache
/etc/init.d/apache2 restart
Konfigurasi sebuah Client / PC
paling gampang kita mengedit komputer client dan mengubah file
/etc/hosts
dengan menambahkan misalnya
192.168.0.66 ocw.mit.edu 192.168.0.66 www.ipl.org 192.168.0.66 www.itb.ac.id 192.168.0.66 www.stkipsurya.ac.id 192.168.0.66 www.ui.ac.id
dengan asumsi
- server menggunakan IP address 192.168.0.66