Kamis, 09 Februari 2012

Menjalankan Web Sederhana Dirumah Anda

Bagi sebagian orang yang memiliki web pribadi atau berkecimpung di dunia web, web hosting adalah suatu hal yang wajib dimiliki. Apalagi dengan menggunakan jasa web hosting walaupun hanya sebatas shared web hosting, seseorang dapat memiliki keleluasaan mengatur situs web yang dijalankannya. Beberapa di antaranya seperti pengaturan nama domain, subdomain, konfigurasi web server, konfigurasi file, email dan sebagainya. Dan tentu saja semua itu dilakukan dengan menyewa space atau tempat di penyedia layanan hosting web. Bagaimana kalau kita mencoba untuk menggunakan komputer sendiri di rumah untuk membangun web hosting sederhana? Ga ada salahnya untuk dicoba, dan di sini aku akan sedikit memberi tips dan trick cara membangun web hosting / server di rumah alias home web server.
Terdapat beberapa persyaratan untuk menjalankan web server sederhana di rumah Anda sendiri. Beberapanya adalah seperti berikut:
  • Internet Service Provider (ISP) dengan private public IP (non-shared). Umumnya provider yang menyediakan IP public seperti ini adalah provider broadband di mana IP yang digunakan tidak dibagi-bagi dengan pengguna lainnya, entah apakah IP itu dynamic atau static (akan lebih bagus kalau static sehingga setiap kali terkoneksi, IP nya tidak akan berubah). Sedangkan provider dial-up umumnya menggunakan satu IP untuk beberapa komputer yang terkoneksi ke internet sehingga tidak akan memungkinkan pembangunan web server. Pada contoh di sini aku menggunakan paket Speedy sebagai providernya yang menggunakan Dynamic IP.
  • Modem atau router. Umumnya menggunakan modem yang hanya menuju ke satu client tidak memerlukan konfigurasi yang berarti, akan tetapi bila menggunakan router wireless seperti yang aku lakukan, maka Anda akan sedikit harus mengatur konfigurasi router seperti Port Forwarding atau membuka firewall di modem atau router. Pada contoh di sini, aku menggunakan modem Linksys WAG200G.
  • Server. Tidak harus menggunakan server IBM atau HP yang berbasis Xeon atau Opteron yang harganya selangit. Bahkan komputer atau laptop biasa yang terknoneksi dengan modem dan ISP yang aku sebut di atas juga bisa dipakai sebagai web-server. Aku sendiri menggunakan laptopku yang terkoneksi dengan WiFi ke modem Linksys di atas. Operating system di server bisa berupa Windows, Linux atau sebagainya.
  • Software seperti Apache webserver dan software-software pendukung lainnya seperti PHP, MySQL, dan sebagainya.
  • Domain name. Agak sulit menerapkan secara langsung agar sebuah domain dapat menunjuk ke sebuah alamat IP untuk server sederhana seperti ini apalagi menggunakan Dynamic IP. Solusinya adalah dengan menggunakan layanan DynDNS.com yang akan mengubah sebuah nama domain (lebih tepatnya subdomain) untuk menunjuk ke IP server Anda. Mengenai ini akan dijelaskan di bawah.
  • Pengatahuan dasar mengenai networking, seperti cara mengatur IP address sesuai sistem operasi masing-masing, cara mengatur modem atau router, dan beberapa istilah networking (istilah-istilah yang belum dimengerti dapat dicari di internet).
Perhatian! Dengan mencoba membuat home web server ini, berarti Anda akan membuka kemungkinan komputer Anda diakses oleh orang lain dari luar (remote). Harap memperhatikan software-software keamanan seperti firewall dan antivirus agar selalu aktif dan selalu terupdate sebelum membuka web server Anda untuk diakses dari luar.

IP diagram for home web server
IP diagram for home web server
Di atas adalah diagram yang kurang lebih menunjukkan skema bagaimana pengaturan IP address dari router, ISP dan sebagainya di rumahku. Pada diagram di atas, aku ambil saja contoh bahwa aku mendapat IP address 125.160.110.60 dari ISP yang aku gunakan dan IP ini adalah dynamic, yang berarti akan berubah ketika aku melakukan koneksi ulang ke ISP tersebut. Gateway dari router yang aku gunakan diatur untuk menggunakan IP address 192.168.1.1. Sedangkan laptop yang aku gunakan sebagai home web server diatur secara manual (tanpa DHCP) untuk menggunakan IP address 192.168.1.110, sedangkan IP address dari PC di sebelah kanan diatur secara otomatis oleh modem.
Untuk mengetahui IP address yang di-assign oleh ISP Anda, coba untuk mengakses bagian status dari modem Anda yang umumnya dapat ditemukan dengan membuka alamat http://192.168.1.1/ dari browser yang biasa Anda pakai, atau gunakan layanan-layanan untuk mendeteksi IP di internet.
Setelah mengetahui IP yang di-assign oleh ISP Anda, sekarang saatnya untuk mematikan firewall untuk port yang umumnya dipakai untuk protokol HTTP yaitu port 80. Untuk pengguna Windows (aku hanya mencoba untuk Windows XP), bisa dilakukan melalui Control Panel > Windows Firewall. Kemudian ke tab Exception dan pilih tombol “Add port…”, masukkan name “HTTP” atau yang lainnya, masukkan port number 80 dan pilih sebagai protokolnya TCP, kemudian tekan OK. Maka dengan mencentang bagian HTTP, port komputer Anda akan terbuka untuk diakses oleh komputer lain. Bila suatu kali nanti ingin mematikan lagi akses ke port tersebut, cukup menghilangkan centangnya saja. Untuk Linux (khususnya yang menggunakan Ubuntu), bila masih fresh dan belum terinstall firewall, tidak perlu melakukan konfigurasi sama sekali. Sedangkan bila menggunakan program firewall lainnya, coba untuk mencari terlebih dahulu cara memberi exception atau memberi hak akses untuk port 80.
Sekarang nyalakan program web server dan program-program pendukung lainnya seperti PHP atau MySQL dan sebagainya.
Bila Anda hanya memakai modem biasa, Anda bisa coba untuk mengetikkan IP address yang didapatkan dari ISP ke dalam browser Anda. Kalau memang tidak ada konfigurasi lain yang diperlukan, maka secara otomatis akan tampil halaman web yang terdapat di home web server. Dan secara ga langsung, berarti modem yang Anda pakai ga terlalu aman karena ga ada fasilitas firewall dan orang lain bisa saja mengakses komputer / server Anda secara langsung, serta rentan terhadap tindakan-tindakan berbahaya seperti cracking dan hacking. Tapi bila setelah dicoba untuk mengakses melalui web browser menggunakan IP address dari ISP Anda ternyata tidak menampilkan apapun, ada kemungkinan bahwa apa yang Anda lakukan masih terhalang oleh konfigurasi router atau modem, salah satunya port forwarding.
Sekarang bagian yang agak sulit adalah port forwarding. Bila Anda memakai router seperti saya yang bisa menghubungkan banyak clients dan mengaktifkan DHCP server pada router Anda, maka yang harus Anda lakukan adalah meng-assign / mengatur IP secara manual di server yang Anda pakai. Kenapa? Karena DHCP membuat IP yang diassign bisa berbeda-beda tergantung jumlah client yang terkoneksi ke router tersebut. Di contoh di atas, aku meng-assign IP address 192.168.1.110 untuk laptopku yang aku pakai sebagai home web server. Selain itu umumnya port forwarding mengharuskan digunakannya IP address yang sama (kecuali ada router / modem yang secara otomatis bisa mendeteksi yang mana laptopku kalau sewaktu-waktu aku mengubah IP nya).
Untuk mengatur port forwarding di router atau modem, login ke router Anda (umumnya menggunakan web browser dan mengetik 192.168.1.1 di address bar nya). Kemudian cari bagian port forwarding, dan masukkan beberapa parameter seperti di bawah ini dalam satu set field port yang akan di forward. Berhubung saya menggunakan Linksys WAG200G, maka field yang seperti di bawah yang nampak, tapi bila menggunakan router / modem lain mungkin bisa berbeda.
  • Name / Application: HTTP (bagian ini tidak terlalu berpengaruh, hanya deskripsi saja umumnya)
  • IP address : 192.168.1.110
  • Internal port: 80
  • External port: 80
  • Protocol: TCP
  • Enabled: Yes / Centang
Sekarang seperti sebelumnya, buka browser Anda, ketik IP address yang di-assign dari ISP ke gateway / router / modem, lihat hasilnya. Bila tampilan sudah tampak seperti ketika Anda mengetik localhost di address bar, maka bisa dikatakan langkah-langkah yang Anda gunakan telah berhasil. Bila belum, maka kemungkinan masih terdapat beberapa hal yang membuat web server tidak bisa diakses, umumnya karena masalah firewall di server, router, atau modem. Oleh sebab itu, bila menemukan masalah seperti ini, silahkan dicoba-coba, atau ditanyakan di bawah.
Lalu kalau sudah berhasil bagaimana? Apakah cukup di sini? Tidak! Bagi sebagian orang, menghafal IP address, apalagi yang dynamic alias berubah-ubah cukup sulit dan merepotkan. Kita akan mencoba menggunakan Dynamic DNS (Domain Name Service) yang berguna mentranslasikan / mengubah sebuah alamat domain (seperti www.example.com) menjadi IP address Anda. Penyedia layanan untuk Dynamic DNS yang banyak digunakan adalah DynDNS.org dan tzo.com.
DynDNS.org menyediakan layanan secara gratis, akan tetapi tzo.com mengharuskan user membayar, sehingga aku lebih menyarankan DynDNS.org. Buat account di DynDNS.org, kemudian pilih “Add Host Service”, dan isi sesuai yang di bawah ini:
  • Hostname: pilih subdomain dan domain yang akan Anda gunakan untuk menunjuk ke IP Anda.
  • Wildcard: boleh Anda centang atau tidak. Bila dicentang, maka bila terdapat sub-subdomain dari hostname yang Anda isi, maka akan otomatis tetap diarahkan ke IP Anda.
  • Service Type: Host with IP address
  • IP Address: Isi dengan IP address Anda. Atau pilih saja “Use auto detected IP address” yang akan membuat field tersebut diisi otomatis.
  • Mail routing: tidak perlu dicentang kecuali Anda memerlukan fasilitas email untuk hostname tersebut (yang berarti tidak termasuk di penjelasan ini).
Setelah semua field diisi, pilih Create Hosts dan setujui “pembelian” seharga $0 tersebut, maka hostname tersebut akan menjadi “milik” IP Anda. Umumnya, beberapa router sudah menyediakan fasilitas untuk meng-assign domain name secara otomatis. Oleh karenanya, Anda juga harus mengatahui terlebih dahulu seluk beluk router / modem Anda dengan mencari kategori menu DDNS atau DNS di sana. Bila menggunakan Linksys WAG200G, maka menu ini dapat diakses melalui bagian Setup > DDNS. Pilih DynDNS.org untuk DDNS Service, isi username dan password yang Anda buat di account DynDNS.org, isi hostname yang sudah Anda pesan sebelumnya, dan klik connect. Setelah itu bila terdapat status “Connected successfully”, berarti semua berjalan dengan lancar, dan ketika modem / router Anda melakukan koneksi ulang ke ISP, secara otomatis IP yang baru akan diarahkan menggunakan hostname tersebut tanpa harus membuka situs dyndns.org tersebut lagi. Bila router / modem Anda tidak menyediakan layanan seperti di atas, maka Anda harus mengunjungi situs tersebut setiap kali Anda ingin mengubah IP address-nya.
Sekian panduan untuk membuat home web server menggunakan DDNS. Bila terdapat pertanyaan, saran atau perbaikan, silahkan bisa disampaikan melalui bagian komentar. Bila ingin menyadur atau meng-copy isi dari artikel ini, harap menyertakan link balik ke artikel ini. Semoga artikel ini bisa berguna untuk Anda semua. :)
Change (22/09/09): Sebelumnya saya menulis bahwa IP address yang didapatkan dari ISP harus private address, dan pernyataan ini merupakan kesalahan penulisan. Yang benar adalah harus mendapatkan IP public dari ISP (non-shared).

32 komentar:

  1. Many thanks for making the truthful effort to explain this. I feel very strong about it and would like to read more. If you can, as you find out more in depth knowledge, would you mind posting more posts similar to this one with more information.
    hosting companies

    BalasHapus
  2. can't you speak indonesian sir ?

    BalasHapus
  3. Heya are using Wordpress for your blog platform? I'm new to the blog world but I'm trying
    to get started and create my own. Do you require any html
    coding knowledge to make your own blog? Any help would be greatly appreciated!


    Also visit my webpage: hosting web services
    my web site - website host reviews

    BalasHapus
  4. Hello there! This article couldn't be written any better! Going through this article reminds me of my previous roommate! He constantly kept talking about this. I'll
    forward this article to him. Pretty sure he'll have a great read. Thanks for sharing!

    Also visit my page :: fripp island vacation rentals
    my website :: us virgin islands vacation

    BalasHapus
  5. Fantastic beat ! I wish to apprentice whilst you amend your web site, how can i
    subscribe for a weblog website? The account aided me a acceptable deal.
    I had been tiny bit familiar of this your broadcast offered shiny clear idea

    my web blog ... www private krankenversicherung

    BalasHapus
  6. An outstanding share! I've just forwarded this onto a co-worker who was conducting a little research on this. And he in fact ordered me dinner simply because I discovered it for him... lol. So let me reword this.... Thanks for the meal!! But yeah, thanks for spending the time to discuss this matter here on your web page.

    Also visit my blog - diesel online outlet

    BalasHapus
  7. Good way of telling, and good article to get data concerning my presentation subject,
    which i am going to convey in institution of higher education.


    Also visit my page private krankenkasse kündigen

    BalasHapus
  8. I know this if off topic but I'm looking into starting my own weblog and was curious what all is required to get set up? I'm assuming
    having a blog like yours would cost a pretty penny? I'm not very internet smart so I'm not 100% certain. Any suggestions or advice would be greatly appreciated. Kudos

    Also visit my web blog - status of loan consolidation
    My page :: cosolidation loan

    BalasHapus
  9. Greetings from California! I'm bored to death at work so I decided to browse your site on my iphone during lunch break. I enjoy the knowledge you provide here and can't wait to
    take a look when I get home. I'm surprised at how fast your blog loaded on my phone .. I'm not even using
    WIFI, just 3G .. Anyways, great site!

    My weblog ... online work from home

    BalasHapus
  10. I'm curious to find out what blog system you happen to be utilizing? I'm experiencing some small
    security issues with my latest blog and I'd like to find something more secure. Do you have any solutions?

    My web-site reseller cpanel

    BalasHapus
  11. When I initially commented I clicked the "Notify me when new comments are added" checkbox and now each time a comment is added I get four e-mails
    with the same comment. Is there any way you can remove people from that service?
    Thanks!

    Feel free to surf to my site - search engine optimisation companies

    BalasHapus
  12. Greate article. Keep writing such kind of information on your blog.
    Im really impressed by your blog.
    Hello there, You have performed a great job. I will certainly digg it and personally
    recommend to my friends. I am confident they'll be benefited from this website.

    Look at my weblog - unsecured loans

    BalasHapus
  13. Greate article. Keep writing such kind of information on
    your blog. Im really impressed by your blog.
    Hello there, You have performed a great job. I will certainly digg it and personally recommend to my
    friends. I am confident they'll be benefited from this website.

    Also visit my weblog unsecured loans

    BalasHapus
  14. Hello there, I found your blog by means of Google whilst looking for a comparable topic,
    your web site came up, it seems to be great.
    I have bookmarked it in my google bookmarks.
    Hello there, just become aware of your weblog through Google, and found that it's truly informative. I am going to watch out for brussels. I'll appreciate if you happen to proceed this in future.
    Many folks can be benefited from your writing. Cheers!

    Feel free to visit my web blog sofortkredit ohne bonitätsprüfung

    BalasHapus
  15. I comment whenever I like a post on a blog or if I have something to valuable to contribute to the conversation.
    Usually it is triggered by the sincerness communicated in the post I read.
    And on this article "Menjalankan Web Sederhana Dirumah Anda".

    I was excited enough to leave a leave a responsea response :-) I do have a couple of questions for you if
    it's okay. Could it be only me or do some of these remarks look like they are left by brain dead folks? :-P And, if you are posting on additional sites, I would like to keep up with anything fresh you have to post. Could you list all of all your public sites like your Facebook page, twitter feed, or linkedin profile?

    Here is my page :: Business To Start Up

    BalasHapus
  16. Thanks for the auspicious writeup. It in truth used to
    be a leisure account it. Look complicated to more added agreeable from you!
    By the way, how could we be in contact?

    My web site - handtaschen outlet

    BalasHapus
  17. Thanks for the auspicious writeup. It in truth used
    to be a leisure account it. Look complicated to more added agreeable
    from you! By the way, how could we be in contact?



    Here is my webpage: handtaschen outlet

    BalasHapus
  18. Great article! That is the type of info that should be shared around the net.
    Disgrace on the seek engines for now not positioning this post upper!
    Come on over and talk over with my site . Thank you =)

    my web site ... Can Private Loans Be Consolidated

    BalasHapus
  19. constantly i used to read smaller articles which also clear their motive, and that is also happening with this article which I am reading at this time.



    Review my web site :: top web hosting companies

    BalasHapus
  20. I'm really impressed with your writing skills as well as with the layout on your weblog. Is this a paid theme or did you customize it yourself? Anyway keep up the excellent quality writing, it is rare to see a great blog like this one these days.

    My web page - top seo company india

    BalasHapus
  21. Thankfulness to my father who shared with me on the
    topic of this web site, this weblog is actually
    awesome.

    Have a look at my page - working from home moms

    BalasHapus
  22. Hello are using Wordpress for your blog platform? I'm new to the blog world but I'm
    trying to get started and set up my own. Do you need any html
    coding knowledge to make your own blog? Any help would be greatly appreciated!


    My web blog ... search engin optimisation

    BalasHapus
  23. Hey There. I found your blog using msn. This is a very well written article.
    I will be sure to bookmark it and return to read
    more of your useful information. Thanks for the post.
    I will definitely comeback.

    Here is my website :: zurich Car insurance uk

    BalasHapus
  24. My developer is trying to convince me to move to .
    net from PHP. I have always disliked the idea because of the
    expenses. But he's tryiong none the less. I've
    been using WordPress on numerous websites for about a year and am nervous about switching to another platform.
    I have heard fantastic things about blogengine.
    net. Is there a way I can transfer all my wordpress content into it?
    Any help would be really appreciated!

    My webpage - top private student loans

    BalasHapus
  25. Link exchange is nothing else but it is only placing the other person's weblog link on your page at suitable place and other person will also do similar for you.

    my blog post :: should i get a home equity loan

    BalasHapus
  26. I loved as much as you will receive carried out right here.

    The sketch is tasteful, your authored subject matter stylish.
    nonetheless, you command get bought an edginess over
    that you wish be delivering the following. unwell unquestionably come further
    formerly again as exactly the same nearly very
    often inside case you shield this hike.

    Stop by my blog post: college loan

    BalasHapus
  27. This design is steller! You most certainly know how to keep
    a reader entertained. Between your wit and your videos, I was almost moved to start my own blog (well, almost.

    ..HaHa!) Fantastic job. I really enjoyed what you had to say, and more than that, how you presented it.
    Too cool!

    Here is my weblog - reseller domain registration

    BalasHapus
  28. It's going to be ending of mine day, but before end I am reading this wonderful paragraph to increase my knowledge.

    Look at my page - jocuri cu merio

    BalasHapus
  29. Hello! Do you use Twitter? I'd like to follow you if that would be okay. I'm absolutely enjoying your
    blog and look forward to new updates.

    Also visit my site :: jocuri gratis masini

    BalasHapus
  30. Heya just wanted to give you a quick heads up and let you know a few of the
    images aren't loading properly. I'm not sure why but I think its a linking
    issue. I've tried it in two different browsers and both show the same results.

    My web blog - http://www.xxxhardcoretubes.com :: www.puspadusy.com ::

    BalasHapus
  31. Heya just wanted to give you a quick heads up and let
    you know a few of the images aren't loading properly. I'm not sure why but I think its a linking issue.
    I've tried it in two different browsers and both show the same results.

    Check out my webpage; http://www.xxxhardcoretubes.com :: www.puspadusy.com ::

    BalasHapus