Difference between revisions of "Mirror Web Internet menjadi Web Lokal"
Silfianaelfa (talk | contribs) |
Silfianaelfa (talk | contribs) |
||
Line 71: | Line 71: | ||
allow from all | allow from all | ||
</Directory> | </Directory> | ||
+ | </VirtualHost> | ||
+ | <VirtualHost *:80> | ||
ServerAdmin webmaster@localhost | ServerAdmin webmaster@localhost | ||
ServerName ocw.mti.edu | ServerName ocw.mti.edu | ||
Line 81: | Line 83: | ||
allow from all | allow from all | ||
</Directory> | </Directory> | ||
+ | </VirtualHost> | ||
+ | <VirtualHost *:80> | ||
ServerAdmin webmaster@localhost | ServerAdmin webmaster@localhost | ||
ServerName www.itb.ac.id | ServerName www.itb.ac.id | ||
Line 91: | Line 95: | ||
allow from all | allow from all | ||
</Directory> | </Directory> | ||
+ | </VirtualHost> | ||
− | + | <VirtualHost *:80> | |
ServerAdmin webmaster@localhost | ServerAdmin webmaster@localhost | ||
ServerName www.stkipsurya.ac.id | ServerName www.stkipsurya.ac.id | ||
Line 102: | Line 107: | ||
allow from all | allow from all | ||
</Directory> | </Directory> | ||
− | + | </VirtualHost> | |
+ | <VirtualHost *:80> | ||
ServerAdmin webmaster@localhost | ServerAdmin webmaster@localhost | ||
ServerName www.ui.ac.id | ServerName www.ui.ac.id |
Revision as of 11:03, 21 November 2011
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.3 ocw.mit.edu 192.168.0.3 www.ipl.org 192.168.0.3 www.itb.ac.id 192.168.0.3 www.stkipsurya.ac.id 192.168.0.3 www.ui.ac.id
dengan asumsi
- server menggunakan IP address 192.168.0.3