Web-hosting for Your Website
Web hosting is a service that enables companies and people to make their website accessible via the World Wide Web(www). A web host provides the infrastructure and services that a website needs to operate on the web. Web-hosting for you
Here you will get the complete guide to hosting your own website. Every site, however big or small, it needs a good web-hosting. It pays to get it right. Whether you are doing it yourself or looking for someone else to do it for you, I will walk you through the necessary steps for getting online and easily.
If you are planning on starting a website, you will need to invest in your own domain name and web-hosting. Depending on your hosting needs. the cost could run from just $50 to over %10,000.
If you are developing a new website, web-hosting your own site on a local machine may be the best option.
It is also important to note that getting a web-hosting for your own site yourself comes with a few disadvantages.
But don’t worry, here you will see all the shortcomings and the available option to solve them.
Web-hosting is the invisible foundation of the internet
Every website needs a ‘home’ or a place where its files are accessible anytime and anywhere. That is what hosting does. It is actually a plot of internet land so if you want a website, it will need to be hosted somewhere.
Good hosting makes for a fast site that is almost always accessible. Good hosting is affordable, low maintenance, and scalable. In the hyper-competitive, low attention span world of the internet, hosting is an essential foundation.
How to host a website using Windows
Hosting a website on your PC can be very interesting. It is recommended that you only opt for this if you want a local development server. A WAMP server is the primary necessity to consider for hosting a website on your Windows operating system.
What is a WAMP server?
WAMP is the contracted form of Windows, Apache, MySQL, and PHP. A WAMP server installs three different applications simultaneously. These services are considered to be quite easier because they allow you to download and install all the packages necessary for hosting any web content.
The elements of WAMP can be explained as follows:
It shows that the AMP applications are compatible with Windows devices. Other platforms such as Linux will have it as LAMP.
This is the core program that performs the hosting services. Apache program is very efficient in hosting HTML files as well as other static web documents.
It offers a database that will contain all your web content. Dynamic web pages need to store data from time to time thus require a database. Examples of such data include usernames, passwords, and emails.
This is the widest spread language for creating dynamic web content. Some of the popular websites known to run on PHP code are Facebook and WordPress.
Steps of Web-hosting your website
Step 1: Installing the WAMP software
Visit the WAMP server website and download the latest version. Choose either 32 or 64 bit depending on your operating system. The package comes with the most recent installments of Apache, MySQL, and PHP. Run the .exe file in the WAMP setup you have downloaded. You will receive installation prompts that are straight forward. Click ‘next’ while maintaining the default values to continue with the installation. Choose the browser of your choice or just hit ‘open’ and the Web server will use your default PC browser.
As you carry out this process, the windows firewall may reject some features of Apache. Thus, make sure to make an exception when you receive a security alert pop up. After the installation is complete, mark the box labeled “Start Wamp server 2 now” before eventually click the “finish” button.
Step 2: Navigating the WAMP server
If you would like to change the pages displayed by the web server, go to www directory by clicking the WAMP icon in the notification pane. The directory is automatically created during installation and can be found in local disk C. You also have the option of creating subdirectories referred to as projects in WAMPserver.
This will come in handy in storing HTML or PHP files. If you install WordPress for instance, its installation files will be saved in the directories. You can update any changes within the application by clicking the refresh button.
Step 3: Create an HTML or PHP page
This section shows you how to test the webserver. Use a web development program such as Notepad to develop a simple PHP or HTML page. Go to ‘save as’ and give it any name and add the extension .php.
Set c:\\wamp\\www to be the destination of the saved file. Return to web server and click refresh to update these changes. Your data will be updated in the www directory.
To test it, go to http://localhost/name.php through your browser. You will be taken to your new web page where you will see the details of your PHP extension.
Step 4: Configuring MySQL
You can begin configuring your MySQL databases by opening the phpMyAdmin panel in the menu. Through here, you can open a new browser window. The admin username automatically sets to ‘root’ after which you are prompted to provide a password. For now, you can leave the password field empty.
You can also customize the MySQL databases or create new ones based on your preference. If you are using CMS software such as WordPress, they provide you with a database by default.
Step 5: Setting the site to be publicly Visible
At this stage, your website is accessible just to the computer in which you installed the webserver application. This can be great if you want to use the webserver for web development and testing practices. In this case, however, you want the rest of the world to see the contents of your site. To make it public, hit the wamp server icon and select the ‘Put online’ option.
Note that the Apache settings file is programmed to deny access to connections from outside which are not the localhost. People clicking on your URL will, therefore, receive a “403 forbidden” message. To rectify this program, you need to change some two lines of code within the Apache configuration file. Locate the httpd.conf file in the wamp server menu inside the Apache folder.
Restart all the services in the webserver through the dedicated button on the menu and your site will now be accessible to anyone from the internet. Make sure to change any PC firewall settings that block web requests.
How to get Web-hosting for your website on a Linux machine.
Just like on the Windows OS, you need to install Apache, MySQL, and PHP to host a website on a Linux machine. LAMP web server provides you with a package that carries all the three important web hosting applications.
Step 1: Install LAMP Software
AMP can be installed in any versions of the Linux OS. You should be able to set up the web server in the PC whether you prefer the command line only Ubuntu. The installation process may take a while due to the download of large volumes of data contained in the package.
Another important thing is that whenever you change the Apache configuration, you have to restart Apache by executing the command sudo/etc/init.d/apache2 restart.
Step 2: Test the PHP Operation
LAMP provides a test that can verify whether the PHP server is operational as well as check the available modules. To execute it, insert the test PHP file into the webserver root directory. After that go to your browser and type http://localhost/name.php then hit enter and it will show your PHP file.
Step 3: Test MySQL and its Bind access
At this stage, you need to confirm whether MySQL installation was successful. This is because CMS systems such as WordPress won’t run without it. Enter the following command to execute the test: service MySQL status. It should be running upon clicking enter but if it doesn’t, restart the MySQL server through the following code: ‘sudo service MySQL restart’.
Step 4: PHP MyAdmin Installation process
Type the command “sudo apt-get install PHPMyAdmin” to install it. If the installation fails, you will have to reconfigure other repositories before repeating the process. For instance, when you encounter a blue screen inquiring which web server you would like to configure, press the space bar. When an asterisk appears, hit the enter button.
A new prompt comes to your monitor inquiring whether phpMyAdmin should create a default database for its exclusive use then click yes. Now you will need to enter your admin username and password to create the database. Restart the database to complete the process.
Step 5: DNS configuration
You may want to configure your local server to have a personal domain name such as exmple.com. To accomplish this, you should change the Apache settings to accept requests from the internet. Make sure that your domain name of choice has an A record. It should point to a specific IP address.
Your DNS records are updated automatically by your DNS hosting service provider. To check whether the configuration was successful, use the dig tool which will return details containing your IP address, domain name, and an authority section.
Advantages of having Web-hosting a website on your system
1) It offers more control and flexibility
Once you host a website on your PC, you will be able to manage all its aspects from the web server installed on your PC.
2) Cost is a big factor
The cost can be both an advantage and a disadvantage. The good side of it is that you can host a website on most DSL connections. The only extra hardware needed is a switch and a web server.
3) You will learn new skills
You can acquire new tricks and maneuvers for setting up your website.
There may be no reputable web hosting companies within your geographical location. The use of different currencies and limited access to online payment methods may also deny you the chance of contracting a reliable web hosting company overseas.
Disadvantages of hosting a website on your system
1) Lack of access to additional services
Virtual web hosting providers usually have a robust infrastructure that offers more space and bandwidth.
2) Security is the question
It is the most serious threat to in-house hosting. Actually you allow other internet users to access your computer. Using your work computer may expose you to hackers and automated malware that will either siphon or corrupt your data.
Your PC is not dedicated specifically to web hosting services rather the webserver software gives it the capability to perform the service.
4) Ability and skills
Web hosting companies are endowed with trained personnel. The hiring of staff or training yourself bring about additional costs that lower the feasibility of in-house hosting.
Internet service providers usually put restrictions on the amount of data that their subscribers can use. Web hosting requires a lot of bandwidth which may exceed the one provided by your ISP through broadband connections.