Can I host my own website?

Yes, you can host your website. You do not have to pay a monthly fee to host your website, or you do not need to set up a lot of technical knowledge. Simply hosting a small number of websites with a small number of visitors can turn the system into a server.

This article describes how to host Microsoft Windows-based Web sites and the disadvantages of this Web site. We install and use the AMP web stack (Apache, Mysql, PHP). This AMP stack is commonly called WAMP for Windows and LAMP for Linux.

Installation of WAMP Server

There are several installation programs, but the simplest is to use WampServer. Go to the site and download the 32-bit or 64-bit executable, depending on your operating system.

If Skype is running during installation, it will crash with port 80. Both WampServer and Skype use port 80. If you disconnect from Skype before running WampServer, everything will work normally.

It automatically creates the www directory at “c: \ wamp \ www”. This is where your site (or your site) lives. Simply create a new folder in your directory and host your PHP or HTML file.

However, before doing this, you should verify that WampServer is working properly. You can access the main WampServer screen by clicking the link in the menu or by opening a web browser and accessing “http: // localhost”.

Testing of WAMP

Congratulations. Your Windows computer is the current server, but it is not that much right now. Before you add a file and stream it over the Internet, you should test everything to make sure it works.

We will create a simple PHP test file and put it in the directory. Open the notebook in Windows and type the following line:

<title> PHP Test </ title>

Save this file as “info.php” in the www directory created by WampServer. Open your web browser and go to “http: //localhost/info.php”. If you see a blank page called “PHP Test” in the tab name, everything works as expected.

Configure MySQL

Click on the phpMyAdmin menu option to start the MySQL database configuration (which may be required for CMS such as WordPress).

The PhpMyAdmin login screen opens in a new browser window. By default, the admin user name is root and the password field is blank.

From there you can create a new MySQL database and modify the existing database. However, most software such as WordPress automatically sets up a new database.

Make the Site Public

By default, the Apache configuration file is configured to reject all incoming HTTP connections, except those coming from the local host.

You must modify the Apache configuration file (httpd.conf) to make the site accessible to the public. You can access the WampServer menu, click on “Apache” and select “httpd.conf” to browse and edit this file.

  1. Reject order, allow
  2. Deny all

Replace the two lines above with the lines below.

  1. Order allow, deny
  2. Allow all

Click “Restart All Services” in the menu to restart all WampServer services.

The site should now be accessible from the local host. Make sure your PC firewall is not blocking web requests. You may need to configure port forwarding on your Internet router.

Using a Domain Name

To use a domain name such as example.com with WAMP installation, you must first configure some files. Suppose the example.com domain has a record in DNS with an IP address of 100.100.100.100.

First, you need to add the following line to your C: \ Windows \ system32 \ drivers \ etc \ hosts file.

  1. 100.100.100.100 example.com

Now you need to edit httpd.conf again to add the virtual host (accessible via the WampServer menu). Once open, find the “virtual host” and uncomment the following line:

  1. # Virtual Host
  2. Include conf / extra / httpd-vhosts.conf.

We now need to manually add the file to “C: \ wamp \ bin \ apache \ Apache-VERSION \ conf \ extra \” (VERSION is the Apache version).

Then create a file with the following contents in Notepad and save it in this Apache directory.

  1. DocumentRoot “c: \ wamp \ www”
  2. ServerAdmin mail@example.com
  3. ErrorLog “logs / example.com.log”
  4. ServerName mysite.local
  5. CustomLog “logs / example.com-access.log” common

To enable this change, click “Restart All Services” from the WampServer menu.

The site should now be accessible through a domain name.

Pros and Cons of Hosting Your Own Website

But not everything is suitable for hosting your own website. Cost reduction was originally the only benefit, but in the long run it was not profitable.

Running your own server will charge your electricity bill faster than you can say “shared hosting.” Cost is much higher than cheap purchases because you need to turn on the server and connect to the Internet permanently. Web hosting plans.

This does not take into account the risk of failure in residential areas. If your industry is interrupted as often as I do, the stability of your website will become ubiquitous. Especially high-performance ISPs do not have to back up.

The cost is high, but hosting your own site is not practical. Your website will experience slow connections, change Google search rankings, and reject potential visitors. Many cheap hosts are traded between 1 second and 2 seconds, but residential connections will be processed in the 15-20 second range.

The process of saving your website online is best used as an educational tool to help you understand how web hosting works. If you expose yourself to all the tools, it’s a good idea to configure your site as an external host.

Share On

Facebook
Twitter
LinkedIn
WhatsApp

Related Post

2024-04-08 22:32:18
2024-03-29 18:39:48
Top 10 web hosting companies in India
2024-03-27 13:48:59
2024-03-21 18:11:19