Graphic Motion Video Art, Website, IT Network, Culture

Loading...

At this moment I am going continue my experiment in order to build Web Hosting Server as my  own self on my personal computer (PC). Web Hosting Server that I am going to build is on our PC server which is one of my PC client on my network that is using just one router port forwarding at this time. Here The equipment environment  that I used:

a. Wamp Server : Windows Web development environment with 3 packages in one, that is Apache, MySQL, PHP.  Wamp Server itself require its dependency that is The Visual C++ Redistributable Packages that must be installed before you install wamp server to make it run on windows.

b. Network Router : It is depending on your network environment of the internet connection that you have use from your ISP (Internet Service Provider). In this case the ISP using their router to provide internet connection that is ZTE optical router. But it doesn’t matter If you use Mikrotik that directly connected to Public IP of internet.

c. No-IP Account: This is for you who no have IP from ISP. No-IP means that you have no private or static public IP. Of course you have public IP but always changed at anytime. Using noip.com will make it possible to create any domain still keep related to your dynamic Public IP.

d. Website Project Files: the files of your website that you have build and need to launch so that you can access the website from outside using internet. In this case I have use wordpress for the complete example the website that using PHP and database Mysql to test Web Hosting Server that we are going to make it.

Before we begin lets take a look the image schema above! I am using the ISP router directly connected to the switch/hub before connected to the local network PC clients. The Web Hosting Server as the PC client can be connected directly to the router or use switch/hub in between if you more than one PC clients. The Web Hosting Server get the IP from ZTE Optical Router with dhcp server inside the router system by ISP. After thay we need to set the IP of Web Hosting Server to be static. We can setup or define the static IP through windows ethernet adapter.

As you can see, the Web Hosting Server as of the client local network already set to be static IP 192.168.1.9 and use the IP gateway 192.168.1.1 of the  local network of the router, in this case ZTE Optical router. After that we need to setup  port forwarding from the router in order to access the Web Hosting Server through public IP of our internet connection.

Ok lets begin step by step in detail how to build Web Hosting Server for Dynamic Public IP using single router. If you have different kind of the router by your ISP, try to find the port forwarding feature that allow you to setup port forwarding!


1. Get Free Sub Domain noip.com as the Domain Name your Public IP

If you have no the account yet, let you register first to make your account on noip.com, then define any sub domain that you will use as the domain name of website project that you want to launch as live web server.

Noip.com has nice domain name, its easy to remember. But as free user we have limited to create the sub domain on it, and has expiration date. But we still have chance to update the sub domain that we have created every month. If you have more funds you can upgrade to be premium user of the noip.com account.

As you can see, the sub domain is related to the IP target that is our current Public IP right the way. But how about when the public IP has changed. Noip.com has provide the app that you must be install on one of PC clients as the client of the local internet network that still using the same Public IP.


You can download Dynamic Update Client app from the site and install it to PC client on the local network. Using this app will keep the sub domain that we have just created still related to our dynamic Public IP. Every time our Public IP is changed, this app will get our current IP and send the request to noip.com to update the sub domain IP from the previous IP to current IP of our public IP. Please keep this app running as the background.

2.  Setup Router Port Forwarding Public IP to the Web Hosting Server


Don’t worry If you have another kind of the router, try to find where the port forwarding feature is. The principle is you setup port forwarding for TCP and UDP protocol of public interface router on port 80 to the IP local network client as the web hosting server on port 8080. We can not using port 80 of the web hosting server, cause most probably port 80 on it is busy.

ZTE router is such kind of the instant or simple router. As you can see, how easy to setup port forwarding on it. But for you Mikrotik lover, perhaps ask to me, why not using Mikrotik. Ok assuming you have use Mikrotik as your router and connected directly to the external/public IP. Or maybe your ISP use mikrotik router to provide their internet connection to you. So this is single mikrotik router port forwarding rules that you must add to the nat firewall as follow:

/ip firewall nat
add action=dst-nat chain=dstnat in-interface=internet dst-port=80 protocol=tcp to-addresses=192.168.1.9 to-ports=8080 comment="TCP port forwarding"
add action=dst-nat chain=dstnat in-interface=internet dst-port=80 protocol=udp to-addresses=192.168.1.9 to-ports=8080 comment="UDP port forwarding"

We require two rules on firewall nat, change in-interface name, it depends on public interface name on your mikrotik configuration. So that we also create port forwarding for TCP and UDP protocol. 

3. Installing Wamp Server According to Public IP and Port Forwarding

The process for the Installation of Wamp Server on windows its not such a big deal that I should be explain explicitly. Just go immediately to http://www.wampserver.com/en/, then you can download Wamp Server for the latest version that now is including with php 7.0.10. Don’t forget before install Wamp Server, you must be install its dependency Visual Studio 2012 : VC 11 vcredist_x64/86.exe


After this you can install Wamp Server itself, before finish the installation, I suppose you to allow Apache http server of Wamp Server running on private and public network on the app windows firewall. Remember we have plan to access Wamp Server as Web Hosting Server through public IP or external IP. So we don’t want app windows firewall blocked Wamp Server.


 4. Adjust Wamp Server Configuration and Windows Firewall Rules

We have done to create port forwarding rules on the router, but our job is not finish yet, still need to Add Windows Firewall rules for TCP and UDP port on windows firewall with advanced security and adjust Wamp Server Configuration.

Adjustment Windows Firewall:

It is the very common way but its required. Most probably we fail in building web hosting server because of it, so that we need to add 2 rules to the port 8080 for each TCP and UDP protocols on windows firewall with advanced security like the picture below!


And don't forget to make sure that Wamp Server is allowed to communicate through windows firewall as private and public on app windows firewall like the picture below!


Adjustment Wamp Server Configuration:

Before we adjust Wamp Server Configuration, let you check everything is working properly. Run Wamp Server App and make sure Wamp Server System Tray Icon should be green.



Type localhost, 127.0.0.1, and The IP address 192.168.1.9 as you set as static IP for the server, all should be able to access from your browser to open Wamp Server.

After that you begin to find httpd.conf of Apache configuration file on Wamp Server installation directory. It is according to the place where you put the Wamp Server installation files on your PC. “C:\wamp64\bin\apache\apache2.4.23\conf”. Open httpd.conf with your favorite editor then

Find the text with “Listen” and change

Listen 0.0.0.0:80 -> Listen 0.0.0.0:8080
Listen [::0]:80 -> Listen [::0]:8080
Find the text with “ServerName” and change
ServerName localhost:80 -> ServerName 192.168.1.9:80

Find the text with “onlineoffline” and change

Require local -> Require all granted

For phpmyadmin of Web Server in order to access it through public IP, find phpmyadmin.conf on Wamp Server installation directory “C:\wamp64\alias”. Open phpmyadmin.conf and change

Require local -> Require all granted

This is just an option, in order to access the web project directly rather then access directory root www just by typing public IP or domain name. We need to set DocumentRoot and Directory, still on httpd.conf like this:

DocumentRoot "${INSTALL_DIR}/www/agratitudesign"
<Directory "${INSTALL_DIR}/www/agratitudesign/">

"agratitudesign" is a directory name of the web project files

You have done to adjust Wamp Server Configuration according to router port forwarding. Then you need to restart all the wamp server services, you can do it from Wamp Server System Tray Icon. Everything should be working properly. At this you can access Wamp Server through public IP or your sub domain that you have created on noip.com. 

4. Adjust Wordpress Sites from Localhost to Live Web Hosting Server

In this case I am using Wordpress CMS as the example of the Website Project that uses database to work with. Its so many tutorial about how to install wordpress, here I just explain  how to adjust Wordpress Website from local configuration to the live web hosting server configuration. Our aim is to test the Web Hosting Server that we have just created.

Ok assuming that you have build Website Wordpress Project to the directory “www” as default document root of Wamp Server. In this example is agratitudesign directory, and I have been move the document root to this directory itself. So that we can access agratitudesign web project just by typing the subdomain of noip.com, that is agratitudesign.sytes.net or agratitudesign.ddns.net. If you don’t how to install wordpress please watching the video of this tutorial for more details.

The most important that I have to tell you, consider that our Wamp Server its not localhost that only can be access from you’re the PC server, but now is the live server that can be access anywhere as long as connected to the internet. Usually we leave “localhost/phpmyadmin” with user root with no password. Imagine that someone type “yoursubdomain/phpmyadmin” they can access the website database with the common login like this. So we are going to create a new login for phpmyadmin of Wamp Server


Create a new user login for phpmyadmin don’t forget activate all global privileges for the user login, after that you can remove the root login, because almost everyone already knows as the default user login for phpmyadmin on windows.

So when we build website wordpress project, we have database name of the site, user login for the database, user login for admin backend for that wordpress site. As usually we do, when we move wordpress project from local to the live web hosting server, we need to adjust wp-config file of wordpress site files



After that we login to the database of this wordpress site, by typing “subdomain/phpmyadmin” with the new login that we have just created. Open the database of the wordpress site and find “wp_options” table and change siteurl and home from localhost to subdomain that we have. Lets see the picture below!


Most probably wordpress website was using hyperlink refers to localhost but now we must change ro subdomain. It would be very painful to do manually one by one to check the database tables. Go to the related database and on SQL tab we insert sql query as follow

UPDATE wp_posts SET post_content = REPLACE(post_content, 'localhost/agratitudesign', 'agratitudesign.sytes.net');

The last is go to wp-admin of the backend wordpress website then select setting > permalinks and update the permalink on the backend.



Well done we have successful to build web hosting server by own self on our local network using dynamic public IP and single router. I have already test the subdomain access, admin backend of wordpess site, the database. Everything is working good, and finally Web Hosting Server is own hands. For more clearly lets watch the video, see you!



Share This Article :
Related Articles

30 comments :

  1. Very helpful suggestions that help in the optimizing topic,Thanks for your sharing.

    หนังใหม่

    ReplyDelete
  2. Wow, absolutely fantastic blog. I am very glad to have such useful information.

    ดูหนัง

    ReplyDelete
  3. Thanks for the very helpful guide.
    Very easy to follow

    Web Hosting Services

    ReplyDelete
  4. hire freelance developer for your next project from the largest and most trusted freelancer site. Learn how you can get even more done with increased productivity and find out why 90% of our customers rehire.

    ReplyDelete
  5. Troubleshooting Envy 6255 Printer is very simple. There could be only certain mistakes for the printer, not printing problem. Logging on to 123.hp.com/setup 6255 will give you a very clear answer. First, make sure all your wires are connected. Any loose connections could also be a bigger reason. Check if the HP Envy 6255 Printer is on by looking at the white light that will glow only if the printer is on. If the light blinks faster, the mistake could be in the wireless network that you are using. In this case, refer to the printer’s display for messages. Navigate to 123.hp.com/setup 6255 and find if all the requirements are satisfied. If the problem persists, look at the glowing light. Meager mistakes could stop us from printing, so ensure everything before starting.

    ReplyDelete
  6. In the hysteria of social networks, free e-mail service remains the cornerstone of corporate internet communication. Therefore, it is only important to evaluate the best available email services and make the right choice for your needs. Many people are satisfied with the provider of email services they now use.
    Additionally, for further queries about the best email service, feel free to interact with active customer care.

    ReplyDelete
  7. This kind of content is so rare and i just loved reading it. I am glad to read your blog.your way of working is really awesome and good. your blog is really cool and great. instastalker

    ReplyDelete
  8. smart outsourcing solutions is the best outsourcing training
    in Dhaka, if you start outsourcing please
    visit us: Seo training in dhaka
    Seo training in bangladesh
    Seo training

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete

  10. I like this web site very much, Its a really webcare360.com nice
    billet to read and obtain info.

    ReplyDelete

  11. I like this web site very much, Its a really https://webcare360.com/ nice
    billet to read and obtain info.

    ReplyDelete
  12. Build your website Today
    Pro Website Hosting | Domain names & web hosting company offers domain name registration, web hosting, reseller hosting and SSL certificate for privacy protection. Enquire now."

    ReplyDelete
  13. The aim of chain of responsibility (COR) is to make sure everyone in the supply chain shares responsibility for ensuring breaches of the HVNL do not occur. Under COR laws, if you are named as a party in the chain of responsibility and you exercise (or have the capability of exercising) control or influence over any transport task, you have a responsibility to ensure the HVNL is complied with.
    JMH Training & Compliance can develop and implement a Safety Management System specific to your organisation to ensure compliance with the HVNL and Work Health & Safety Act and train key personnel to be competent in maintaining that system.

    Chain of responsibility

    ReplyDelete
  14. ISO 20000 is an international standard for IT Service Management System (ITSMS). This standard specifies requirements to enhance the service management system’s performance of the organization. Also, it ensures the continual improvement of the quality of services. Visit ISO 20000 Certification in spain

    ReplyDelete
  15. web hosting Canada
    Optidigital : get best web hosting service in Canada. We offer the best web hosting service. Choose web hosting for your personal and professional websites.

    ReplyDelete
  16. This comment has been removed by the author.

    ReplyDelete
  17. The high quality information and the best Essay Structure Writing Help are provided by the writers and professionals of BookMyEssay. order now for best deals!
    visit: https://www.bookmyessay.com.au/

    ReplyDelete
  18. Thanks for sharing an interesting post. After this post, If you are Looking for Web Development Services! So you are reading a right comment! Web App Development Company

    ReplyDelete
  19. Setting up a web hosting in pakistan with Wamp Server, dynamic IP, and router port forwarding is a hands-on approach for enthusiasts. This DIY solution can be cost-effective for hosting websites locally, fostering a growing interest in web hosting in Pakistan.

    ReplyDelete
  20. "I loved reading this blog. The unique perspective and detailed explanations provide a fresh take on the topic. Keep up the excellent work!"
    drift coupons

    ReplyDelete
  21. "What an incredible blog post! The thoughtful insights and well-structured content make it a pleasure to read. Thank you for sharing your knowledge!"
    Longleat Voucher Code

    ReplyDelete

Back to Top