Search This Blog

Thursday, July 24, 2008

Ch01 : Reasons For Hosting Your Own Web Site

Quick HOWTO : Ch01 : Reasons For Hosting Your Own Web Site

From Linux Home Networking

Web sites have proliferated greatly over the years to become a part of everyday life for many people. People use them to create Web logs of their daily lives, provide family members with a place to store their memories or to tell people of their experiences in getting things to work. The following is a typical Web site address:

www.linuxhomenetworking.com

Businesses originally used them primarily as a marketing tool, but later expanded them to become an important part of their operations. Many companies rely almost exclusively on their Web sites to sell their products and provide both customer and supplier support services.

The decision as to whether or not to host your own Web site can be difficult. You have to consider factors of cost and convenience as well as service and support. This chapter briefly addresses the most common issues and outline the simple network architecture for use in a small office or home on which the focus of the rest of the book will be based.

Not all businesses departments and homes require a Web site, but the process of establishing one touches many aspects of not only Linux, but information technology as well. This book is about to setting up Linux servers to do the things that most businesses and homes need. It's about getting the job done.

With this in mind, the book is divided into three sections of gradually increasing complexity to make this process easier. After this chapter, the first section introduces you to networking, software installation and troubleshooting before the first major project of using Linux as a main departmental file server for Windows PCs. The next section expands upon this knowledge to show you how to create, manage and monitor your own Linux-based Web site on this network using a simple DSL or cable modem Internet connection. Finally, the third section covers more advanced topics that will become invaluable as your Linux administration role expands.

Our Network

The typical small office or home network is usually quite simple with a router/firewall, connected to a broadband Internet connection, protecting a single network on which all servers and PCs are connected as seen in Figure 1-1.

As stated before, the rest of the book shows you how you can make a simple layout such as this become a functional low volume Web site, but before you do it would be best to weigh the pros and cons of doing this.

Figure 1-1 : Wireless home network topology

Image:Topology.gif

Alternatives To In-House Web Hosting

There are two broad categories of hosting options for small Web sites. There are companies that host multiple Web sites on the same server, and are called virtual hosting providers. There are also those that allow you to use servers completely dedicated to your site, these are called dedicated hosting providers. Dedicated providers might provide you with only a network connection for a server you purchase ands install in their data center, or they might offer a menu of services from monitoring to backups from which to choose.

Virtual Hosting

It is easy to find virtual hosting companies on the Web that offer to host a simple Web site for about $10 per month.

The steps are fairly straightforward:

  1. Sign up for the virtual hosting service. They will provide you with a login name and password, the IP address of your site, and the name of a private directory on a shared Web server in which you'll place your Web pages.
  2. Register your domain name, such as www.my-site.com, with companies like Register.com, Verisign or RegisterFree.com. You must make sure your new domain name's DNS records point to the DNS server of the virtual hosting company.
  3. Upload your Web pages to your private virtual hosting directory.
  4. Start testing your site using your IP address in your Web browser. It takes about 3-4 days for DNS to propagate across the Web, so you'll probably have to wait at least that long before you'll be able to view your site using your domain, www.my-site.com.

The virtual hosting provider will also offer free backups of your site, technical support, a number of e-mail addresses and an easy-to-use Web based GUI to manage your settings. For an additional charge, many will also provide an e-commerce feature which allows you to have a shopping cart and customer loyalty programs.

The disadvantage of virtual hosting is that, though it is cheap, you often have no control over the operation of the server and have to rely on the staff and operational procedures of the hosting company to get your changes implemented. These may not necessarily be to your liking.

Dedicated Hosting

In this scenario, you typically have to make contact with a live sales representative who represents an Internet data center. At a minimum, you have to pay for the amount of space your server occupies in the data center, the amount of power it consumes and the amount of Internet bandwidth you expect to use. Additional services such as backups, monitoring, on call engineering time, firewall management and bandwidth graphing information often can be purchased as extra line items on your bill.

As you can imagine, these services can be fairly expensive. A 3 cm slot in a computer rack for a Web server can easily cost $200 per month for 1 Mbps of bandwidth. The advantage over virtual hosting is that you can customize the server to your needs.

Despite the relative merits of external hosting, you may also want to consider doing it yourself.

Factors To Consider Before Hosting Yourself

Hosting your Web site externally, especially virtual hosting, is the ideal solution for many small Web sites but there are a number of reasons why you may want to move your Web site to your home or small office. The pros and cons of doing this are listed in Table 1-1.

Table 1-1 The Pros and Cons of Web Hosting In-House

Savings Costs Risks
  • Monthly out sourced Web hosting fee
  • Elimination of the cost of delays to implement desired services.
  • New hardware and software
  • Possible new application development.
  • Training
  • The percentage of IT staff's time installing and maintaining the site
  • Potential cost of the risks (% likelihood of failure per month X cost of failure)
  • Likelihood of a failure and it's expected duration
  • The cost of both the failure and post-failure recovery (hardware, software, data restoration, time)
  • Irregular procedures that could increase the vulnerability of your site to failure.

Is In-House Hosting Preferred?

There are a number of advantages and disadvantages to hosting Web sites that are physically under your own control.

Pros

  • Increased Control and Flexibility: You will be able to manage all aspects of your Web site if it is hosted on a server based either in-house or within your control at a remote data center. You won't have to wait before changes are made and you can select the IT solution that best meets your needs, not those of the hosting provider. You can install the software you need, not what the ISP dictates.
There is also the possibility of offsetting the cost of your server by subleasing space on it to other companies in your community, so that you can become a small virtual hosting service yourself.
  • Cost: It is possible to host a Web site on most DSL connections. A Web site can be hosted on this data circuit for only the additional hardware cost of a network switch and a Web server. You should be able to buy this equipment second hand for about $100. If your home already has DSL there would be no additional network connectivity costs. So for a savings of $10 per month the project should pay for itself in less than a year.
The cost of using an external Web hosting provider will increase as you purchase more systems administration services. You will eventually be able to justify hosting your Web site in-house based on this financial fact.
  • New Skills: An additional benefit is learning the new skills required to set up the site. Changes can be made with little delay.
  • Availability: Reliable virtual hosting facilities may not be available in your country and/or you may not have access to the foreign currency to host your site abroad.
  • Language: ISPs often provide technical support in only a few languages. If you can't get adequate support for billing, engineering, and customer care services, then an in house solution may be better.

Cons

  • Lost Services: You lose the convenience of many of the services such as backups, security audits, load balancing, DNS, redundant hardware, data base services and technical support offered by the virtual hosting company.
  • Security: One important factor to consider is the security of your new server. Hosting providers may provide software patches to fix security vulnerabilities on your Web servers and may even provide a firewall to protect it. These services may be more difficult to implement in-house. Always weigh the degree of security maintained by your hosting provider against the security you expect to provide in-house. Proceed with the server migration only if you feel your staff can handle the job.
  • Technical Ability: Your service provider may have more expertise in setting up your site than you do. You may also have to incur additional training costs to ensure that your IT staff has the necessary knowledge to do the job internally.
  • Availability: In many cases the reliability of a data center's Internet connectivity is usually higher than that of your broadband connection.
  • Cost: Though you may be able to save money on a data circuit, there are other costs to consider. You may not have access to cheap real estate in which to host your servers. Commercial office space is often more expensive than basic data center space. You may have to purchase additional equipment and services to support your servers, such as UPSs, backup systems, software patch management, maintenance contracts, monitoring systems and additional power feeds, all of which may be already bundled in with the services of an external data center.

How to Migrate from an External Provider

Chapter 18, "Configuring DNS", which covers DNS has a detailed explanation of the steps involved in migrating your Web site from an external hosting provider to your home or small office. You should also read Chapters 20, "The Apache Web Server", and 21, "Configuring Linux Mail Servers", on Web configuration to help provide a more rounded understanding of the steps involved.

In-House Server Considerations

For small Web sites without a great deal of database activity and where "hot standby" hardware isn't a great need a basic desktop system will work fine. The linuxhomenetworking.com site, which was the inspiration for this book, receives over half a million page views per month and runs on a 1 GHz Intel Celeron with 1GB of RAM. A secondhand PC is adequate in this case.

Purpose-built Web servers, tend to use multiple CPUs, dual redundant power supplies, high-speed redundant SCSI disks that can be replaced while the system is running without affecting performance, special error-correcting ECC RAM, multiple PCI buses, special built in diagnostic tools and slim line cases only a few inches high. They cost significantly more, but you pay for the peace of mind when your only source of income is your Web site.

Try to have a dedicated area for your server that's clean, cool, and dry, and uses UPS-protected power. Label all your cables at both ends and try to create an updated network diagram that you can show anyone who will provide you assistance.

Another good idea is to color-code your cables. Some companies use one color for networks using private IP addresses and another for Internet-facing networks, others use one color for straight-through and another for crossover cables.

Wireless technology for a home-based Web site can be extremely convenient. You can place your small wireless router near your DSL/Cable modem and the server anywhere in the house. In my little lab, I have one server behind a bookcase, another behind the TV, one under a bed, and a couple around my desk. When you live in an apartment, there may be no other choice, but the risk is that a book falling behind a bookcase or a bounce from a vacuum cleaner, could take your site off the air.

Selecting an Internet connection for your Web site may not be as easy as it first seems. There are many data circuit technologies such as cable modem, DSL, and wireless links, but they may not available in your area or the installation times may not be acceptable. High speed links are usually marketed to businesses and their cost per megabyte of data transfer is usually higher as the service may be combined with data center space, be more reliable, offer more bandwidth and provide better customer support. Some technologies, such as T1 links, can optionally provide a dedicated circuit between two locations external to the Internet but the service also has a per kilometer monthly distance charge.

DSL and wireless services are sometimes asymmetrical, in that the downstream data rate from the Internet is different the reverse upstream speed. You should be most concerned about the upstream speed for your Web site to the Internet. Inbound Web browser queries don't use a lot of data bandwidth, but the Web pages that contain the outbound replies do. Internet service providers (ISPs) provide asymmetric services for residential users and the downstream rate is almost always higher than the upstream. They reserve symmetrical data circuits for businesses which usually need high bandwidth to both surf the web and serve Web pages. The ISP will usually provide the business with a fixed range of Internet addresses as part of the service; residential customers usually get a dynamic address allocation. This can have an impact on your Web site preparation and will be discussed in more detail in later chapters.

Another source of concern would be deciding on the operating system to use. A popular one is Windows which may be the only product your Web or business application will work with and with which your staff is most familiar. These issues are becoming less important as software vendors are increasingly porting their applications to Linux, an increasingly strong rival to Windows which also has a lower overall total cost of ownership, especially for smaller companies.

This book focuses on Fedora Linux with some references to RedHat Linux, its popular corporate cousin. What's the difference? Until Version 9, RedHat Linux was a free product. The company then decided to create enterprise and desktop versions that had paid service contracts bundled with them and these maintained the RedHat brand. At the same time RedHat decided to create Fedora Linux as a support-free product with an aggressive development cycle, which is generally unsuitable for businesses that often require more stability and support. New versions of Fedora are released every 6 months. Though the original applications may be developed by volunteers, the Fedora versions are maintained by RedHat. Once Fedora updates are proven stable they are incorporated into the RedHat Linux releases which are updated every 12-18 months. Constant communication between RedHat and the developers help to keep the updates synchronized.

I chose Fedora because it's free. You don't have to get a purchase order to play with Fedora. When you become comfortable with it and have proven the concept to yourself, your peers and management, you can then consider the more stable RedHat equivalent.

I also chose Fedora Linux because it's popular and it's the Linux flavor I've worked with most frequently at home and at work. This may not be the one suitable for you, and other Linux distributions should also be considered.

Conclusion

The decision to manage your Web site in-house can be difficult. Whatever you choose to do, plan carefully. Always get a professional opinion, even if it's informal, and always be aware of the potential risks of the decision you make.

If you decide to do it, this book will provide a lot of guidance in completing a successful project.

No comments: