Difference between revisions of "Mirror Web Internet menjadi Web Lokal"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 54: | Line 54: | ||
NameVirtualHost *:80 | NameVirtualHost *:80 | ||
− | + | ||
<VirtualHost *:80> | <VirtualHost *:80> | ||
ServerAdmin webmaster@localhost | ServerAdmin webmaster@localhost | ||
Line 66: | Line 66: | ||
</Directory> | </Directory> | ||
</VirtualHost | </VirtualHost | ||
− | + | ||
− | + | <VirtualHost *:80> | |
− | + | ServerAdmin webmaster@localhost | |
− | + | ServerName ocw.mti.edu | |
− | ocw.mit.edu www. | + | 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 | ||
==Edit DNS== | ==Edit DNS== |
Revision as of 15:35, 18 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 /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