How to use the website: Free SMS

6 Comments

Davao Directory’s Free SMS is built with several cool features. The not-so-good-thing is, most people do not know know how to use its full capabilities. In order for you to have a full view on how to completely make use of the website, visit Davao Directory’s forum at http://forum.davaodirectory.com or directly follow this link: http://forum.davaodirectory.com/viewforum.php?f=10

Discussed in the forum are topics about how to use the SMS Page, Profile Page, and Phonebook. Check it out!

How to setup your own web server

4 Comments

A website cannot operate without a web server and a web server can just be a personal computer running on an operating system supporting an internet connection. The only problem is, how are you going to setup your own computer so that it can serve a website accessible through the internetwork?

After you finish reading this article, you will learn how to setup your own web server with the following minimal conditions:

The server side:

  1. Your computer should be running under Microsoft XP.
  2. At least, memory is 512 MB (this would determine how many request and how fast your server can process).
  3. At least, 384 Kbps internet connection speed (this would determine your bandwidth whether how fast it can send data over the network).
  4. A WAMPserver (more details will be explained later).

The domain:

  1. Domain may be pointed to any IP Address (Total DNS Control).
  2. For subdomains, you should have full control over your “A Records”.

Your personal computer might be connected on a Local Area Network (LAN). This means, computers within your network might be sharing a common internet connection. Now for every LAN, there always has to be a router. You would need to configure that router first before you can start setting up your personal web server.

Configuring your LAN router

If you’re not using any router, then you may skip this part, but if you do have a router, then you should begin doing the following steps:

  1. Access your router’s setup page by simply typing “http://192.168.2.1/” (without the quotes) in your browser’s address bar (by default, your router’s local address is 192.168.2.1).
  2. Go to your router’s Port Forwarding options. In my case, since I’m using Edimax, it is located under NAT ยป Port Forwarding.
  3. Enable port forwarding and input your PC’s local IP address (note: common local IP address starts with 192.168.2.1**); select both TCP and UDP (ports); type under port range: 80 – 80 (this is the default port number used by browsers upon requesting data from your web server). Note: you can check your PC’s local IP address by running your Command Prompt (cmd), type “ipconfig”. It will display your Windows IP Configuration. Look for your IP Address under your Local Area Connection.

If you’re wondering what is the purpose of the steps given above, then here it is. When a client (the web surfer) requests for a page from your server, it actually accesses your real IP Address (the formal unique address of your server provided to you by your Internet Service Provider or ISP). Since all requests from the internet must pass first through your router, then the router must know where to submit that certain request on any computers connected within that local network. By configuring your router’s port forwarding, it follows a protocol set by you that any request passing on a specific port number (in our case, it’s 80), it would directly be forwarded to the computer having the Local IP address as specified.

Installing WAMPserver

WAMP stands for Windows Apache MySQL & PHP. This is a single installation complete package for web servers using Windows. First, download the latest version of Wampserver from their website at http://www.wampserver.com/en/download.php. Simply then install WAMP by just following the steps provided during installation. You may choose to alter whatever default settings if you do know what you are doing, otherwise, just press Next.. Next.. Finish.

Configuring virtual hosts

Basically, virtual hosts are those which allow a certain web server to recognize and host more than one domain. If you are planning to host more than one domain, or if you’re planning to add subdomains, then you should read this part here strictly, otherwise, still you need to read it.

The next few steps may be a bit difficult and is the hardest part to understand, but still, it’s one of the most crucial and important configurations that you have to apply for your web server to operate.

  1. Run a text editor software or you may simply make use of Window’s Notepad. Open the file named “hosts” (literally it doesn’t have any file extension) inside the “C:\WINDOWS\system32\drivers\etc” folder. This is a configuration file which tells the operating system which domains are allowed to be accessed on your computer.
  2. You may be able to see some “#” as the first character for every line. This implies that the lines started with “#” is commented and are ignored as part of the configurations. The rest which do not have this character are the ones read. By default, written there is:

    127.0.0.1 localhost

    Where “localhost” stands for the default domain hosted by your computer. Almost every web server always have their localhost, and it represents your real IP address (in the internet it is domain.com). So, if clients would access your computer, they would be given the response to whatever is configured in your localhost.

  3. You may leave that configuration as how it is, or if you wish to add subdomains, you can add another line beneath it describing the name of the subdomain you want to use. For example, you wanted a “blog” subdomain. So, it should read as “blog.localhost”. It would then look like this:

    127.0.0.1 localhost
    127.0.0.1 blog.localhost

    Then, save the changes you made.

  4. The next file you need to configure is your “httpd.conf” file. It is located at your wamp directory. By default, it is inside the “C:\wamp\bin\apache\apache2.2.8\conf” folder. Open the file using again a text editor. Search for the string: “# Virtual hosts“. The line next to it must be enabled. Uncomment it by removing the “#” character. Then, it should look like this:

    # Virtual hosts
    Include conf/extra/httpd-vhosts.conf

    This will allow Apache to read the configurations in your “httpd-vhosts.conf” file. Save the changes you made.

  5. Consequently, since you have already included the vhosts configuration file, it is then logical to reconfigure it. Let me explain this part by showing you some examples. Notice the example below:

    <VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot “C:/Files/My Websites/davaodirectory”
    ServerName localhost
    ErrorLog “localhost-error.log”
    CustomLog “localhost-access.log” common
    </VirtualHost *:80>

    The 1st line opens a new virtual host pointing to the port number 80. The 2nd line, ServerAdmin. Just follow its format anyway. DocumentRoot on the 3rd line specifies the folder on where your virtual host would locate it. So, you would just imagine that the DocumentRoot is your website’s homepage. Under the 4th line, ServerName is your domain name. This time you may replace “localhost” to whatever domain name you’ll be using. In my case, it is “davaodirectory.com“. Note that it is important to include the “.com” or “.net” depending on the extension you chose when you bought your domain name. The next 2 lines sets the file name where certain logs like errors and custom logs would be written. Then the last line closes the new virtual host.

  6. You might probably want to add your own subdomain, so you would just to write a little bit of tweaking. This example may sum it all:

    <VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot “C:/Files/My Websites/davaodirectoryblog”
    ServerName blog.localhost
    ErrorLog “localhost-error.log”
    CustomLog “localhost-access.log” common
    <directory “C:/Files/My Websites/davaodirectoryblog”>
    Options Indexes FollowSymLinks
    AllowOverride all
    Order Deny,Allow
    Allow from all
    </directory >
    </VirtualHost *:80>

    Under the ServerName, you may replace “blog.localhost” to the subdomain you planned to add. As in my case, it’s “blog.davaodirectory.com“. You would notice I’ve included a few new lines starting at “<directory>”. Just follow its format, and be sure to specify its directory the same as the directory you specified above it.

  7. Finally, it should be able to look like this:

    <VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot “C:/Files/My Websites/davaodirectory”
    ServerName localhost
    ErrorLog “localhost-error.log”
    CustomLog “localhost-access.log” common
    </VirtualHost *:80>

    <VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot “C:/Files/My Websites/davaodirectoryblog”
    ServerName blog.localhost
    ErrorLog “localhost-error.log”
    CustomLog “localhost-access.log” common
    <directory “C:/Files/My Websites/davaodirectoryblog”>
    Options Indexes FollowSymLinks
    AllowOverride all
    Order Deny,Allow
    Allow from all
    </directory >
    </VirtualHost *:80>

You’re done with the virtual hosts and now it’s time to learn how to publish it online. But before you proceed to the final step, you would still have to restart your wampserver. Just left click on its icon located at your Windows tray, then click on “Restart All Services” to let all changes take effect.

Publishing your website online

Login to your account where you bought your domain name. Proceed to your Total DNS Control, or the Control Panel where you can reconfigure the IP Address your domain should point to. Under your “A Records” panel, you may include a host “@” or “www”, where both points to your real IP address. Now if you’ve been wondering what is your real IP address, just check it out by visiting this website: “http://ipchicken.com“. The IP address (123.456.789.012 or whatever) it shows is your real IP address. Note that “@” host represents your domain name without any host name (http://davaodirectory.com without the “www”), while “www” represents the domain name with the host name “www” (http://www.davaodirectory.com).

Finally, about subdomains, which really took me almost 24 hours to figure out, is just a simple host name. Which means, you just have to add an “A Record” with a host name with whatever subdomain you wish to add. It’s typically free, but still it needs to be configured manually. Well, in my case, my host name for my subdomain is “blog” then pointing to my current IP address.

After everything has been done, you just need to wait for not more than 30 minutes before it would take effect. Then, you may start writing your HTML codes or PHP perhaps, build and host your own website.


Note:

If your IP is dynamic, then you have to reconfigure your DNS and repoint it to your new IP address. Since mine is also dynamic, you would notice it only changes everytime your modem restarts. Anyway, if you do want your IP to be static, then you just have to ask for it from your Internet Service Provider.