Many webhosting sites offer free accounts with limited disk storage. The amount offered by most sites, usually 1500 to 2000 MB, is more than enough for all the code exercises. Some of the exercises in this book can only done through a server. It is important, therefore, to secure resources on a server. Many webhosting sites offer this service for free.
All that is needed to obtain an account is an email address. After registering for an account, a message is sent to the email address for verification. Once confirmed through email, the account is activated. These are free accounts so there is no need to enter payment information.
Some countries restrict access to webhosting sites. For example, all of the webhosting sites lited below cannot be accessed in China. Certain Internet Service Providers (ISPs) and universities in other countries, including the United States, restrict access as well. Although cumbersome, these restrictions can be circumvented using a virtual private network (VPN). A VPN is usually employed when communicating with any server.
Free webhosting accounts are always a subdomain. This means that the web address will be something like http://mikep.podserver.info. The main domain is "podserver.info". If you wanted a web address like http://your_name.com, this would be its own domain that would need to be registered separately. Registering a domain involves a fee. While some sites will advertise that they offer a free domain, they will invariably charge a monthly fee to recoup the cost.
All of these sites also offer paid hosting and will help create your domain. Yearly costs can be under $25. Webhosting sites all experience some downtime so it is best to create two accounts in case one becomes inoperable. After you determine which site is most stable, you can purchase your own domain through that site. Having your own website to show your work would be valuable in your professional life as a way of showing your work.
Webhosting services have a standardized interface through what is called the cPanel, or control panel. Although many different tools are offered through the cPanel, only a subset of those will be needed here. Of the tools offered, FileManager is used most often. It is designed to upload, edit, move, rename, and delete files. To complete the assignments in the book, the minimum requirement is to create a MySQL database. Data is uploaded to the database with phpMyAdmin. So, the three online tools that must be present through the cPanel are FileManager, MySQL and phpMyAdmin.
All files that are to be served through the web reside in a specific folder, usually called "htdocs" or "public". A file called "index.htm" in this folder would be displayed by default. If this file is not present, accessing the website will simply list the contents of the htdocs or public directory.
A variety of free webhosting services are available. The following list shows those that work:
Recently tested and working:
podserver.info - Displays ad bar on bottom of all pages. Can be suppressed with AdBlock browser extension. All addresses need to be prefixed with "www".
fnHost.org - No ads or inapporpriate redirects.
000webhost.com - No ads or inapporpriate redirects.
yupage.com - No ads.
ByetHost - Redirects on missing pages to display inappropriate pictures.
uHostFull - Redirects on missing pages to display inappropriate pictures.
x10Hosting - No ads or redirects. Nice interface and FileManager but access to MySQL and phpMyAdmin is difficult.
Students have experienced problems wtih all of these services:
Host-Ed - Requires name, address and phone number. Other sites don't require this.
HostFree - Needs 48 hours for account activation?
Freeost - Redirects to cpanel.main-hosting.com, then non-English language.
FreeHostingHero - No confirmation email received.
000Free- No confirmation email received.
1FreeHosting - No confirmation email received.
0-Host - No confirmation email received.
FreeHosting - Redirects to ipage.com, asks for money.
Oxhost - No confirmation email received.
My3gb - Doesn't load properly.
3owl - No confirmation email received.
888webhost- No confirmation email received.
Amazon Web Services (AWS)
Another alternative for webhosting is to use a virtual server through Amazon Web Services (AWS). Amazon Web Services (AWS) is a cloud computing platform provided by Amazon. While AWS does not implement free webhosting directly, it does offer a limited server for one year of use. Since most webhosting software is open-source, all of the necessary software can be installed including the cPanel, Apache, MySQL and php (collectively called a "stack"). AWS offers packages or images to assist with the installation of these tools. WebUzo has a LAMP stack Single User Control Panel. LAMP stack is a popular open source web platform commonly used to run dynamic web sites and servers. It includes Linux, Apache, MySQL, and php/Python/Perl. While AWS servers are very stable, a disadvantage of the service is that a credit card must be used to activate the account. It is best not to provide a credit card unless you are willing to eventually pay for services.
Building your own Server
Finally, it is also possible to create a server using your own hardware. Servers generally don't require a fast processor or a lot of memory — and certainly no graphics card. The software is generally free, especially for Linux and Macintosh. The only requirement is that you have a static IP address and can register the site with a nameserver, a computer that translates domain names into IP addresses. Otherwise, you'll need to always type the numeric address, like http://220.127.116.11 - and that's hard to remember.