Hello,
Help please!
I am using XAMPP for my website. My website is almost ready now. It is working fine in localhost. Now I would like to make it online (public). And, this is my main OBSTACLE.
I have already bought a domain. I also configured the Port Forwarding in router. However, I am getting a problem to publish it online. I have no further idea how to do. This is my first ever website. Hope some of you could help me. I would greatly appreciate your step-by-step suggestion.
Thank you. I have installed my XAMPP in the server. Yes, I have setup my DNS record and static IP address. I was able to see my website online with IIS. Now, I have already disabled IIS and want to make my website online using XAMPP.
First, hosting a site on your personal computer is never a very good idea. Any compromise to the site could easily mean a compromise to all the data on your computer. In addition, considering the cost of powering a desktop, keeping up with software, dynamic DNS, etc you probably aren’t saving all that much over getting a good cheap host like VPS.
On to how to do it.
First, assuming your own computer uses DHCP to retrieve it’s IP address you’ll want something like the standard service at dyn.com to update your domain name when your IP address changes.
Next, make sure port forwarding is correctly configured on your router.
Finally, make sure your XAMPP is correctly configured and that your computer firewall will allow connections to port 80.
I am hosting the website from our office server. Yes, I have done port forwarding as I was able to see website online with IIS. Also, I can run my website locally with XAMPP. Could you clarify “make sure your XAMPP is correctly configured”? Do I need to make any changes in XAMPP configuration? I have disabled the firewall.
Thank you for your quick reply.
The default configuration is not good from a securtiy point of view and it’s not secure enough for a production environment - please don’t use XAMPP in such environment.
Besides xampp issues, there are many many other things you need to worry about if you’re trying to host from home. First, you’ll need a static IP and/or dynamic DNS for your domain. Your ISP may block port 80 depending on the type of account you have. You need to take care of backups, power backup, redundancy, security, and possible liability if your website leaks any sensitive information.
I’d say spend 5 bucks a month and get a hosted account at a reputable linux host, then keep your xampp for development, only upload to the active site when you’ve debugged everything. A host does all the things I mentioned above for you, plus you’ll get email and other goodies for your domain.
Most ISPs provide a connection that is asynchronous *that’s what the A in ADSL stands for). What it means is that the speed for sending things from your computer to the internet is a small fraction of the speed in the other direction.
To self host you will need a connection speed many times that of the typically offered download speed from your ISP for uploads. To get that speed you will need a dedicated fibre optic line from a data centre that already has such a connection available. You would be able to have the computer located IN the data centre and monitored by their staff for a small fraction of the cost such a line would cost - say a few hundred a month instead of thousands.
Thank you very much for your valuable suggestions. Our web hosting is dedicated web hosting. Internet speed seems quite reasonable.
After I made the configuration in vhosts.config for an internal and external ip addresses as per explanation in this link, VirtualHost Examples - Apache HTTP Server
I am able to see the website with both the domain name and ip address from any computer within my office. However, I cannot see the website from outside the office.
Also, when I ping the domain from any computer within my office, it replies correctly. However, when I ping from the outside, it shows time out.
I greatly appreciate your further suggestion.
You need to talk to office IT about hosting, they probably aren’t letting things through the firewall. No idea what your topography looks like, but that is a pretty tall ask.
As a network administrator, I would never green light hosting anything public on XAMPP but that is a different issue.
Thank you everyone. I double checked everything and finally I found that the default gateway was unintentionally changed. That was the reason of not communicating the website with outside world. Now the problem is resolved and website is online!
Thank you again for your great help and suggestions.