[Problem]Hosting public website using XAMPP
Posted: 25. August 2010 05:49
Hello Everyone,
I have developed a website using XAMPP. The root folder is C:\Xampp\htdocs\website I already have a static IP as well as a registered domain name.
I need to know how do i point my public IP into XAMPP?
For example, my public IP (static) is 203.125.100.100
It is to be configured such that when visitors from anywhere types in http://203.125.100.100 in a browser, it will be pointed to the website hosted by the XAMPP server (NAT). The XAMPP server IP is 192.168.42.45 (Internal network)
I have already configured the rules inside my firewall: From external to Internal, doing a NAT 203.125.100.100 > 192.168.42.45, as well as unblocking port 80 and 403 (read it from somewhere you have to unblock port 403)
This is the config i edited, not sure if it is right:
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
NameVirtualHost 192.168.42.45:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost 192.168.42.45:80>
ServerAdmin yolkie@email.com
DocumentRoot "C:/xampp/htdocs/website"
ServerName 192.168.42.45
ErrorLog "C:/xampp/apache/logs/error1.log"
CustomLog "C:/xampp/apache/logs/access1.log" combined
</VirtualHost>
##<VirtualHost *:80>
##ServerAdmin postmaster@dummy-host2.localhost
##DocumentRoot "C:/xampp/htdocs/dummy-host2.localhost"
##ServerName dummy-host2.localhost
##ServerAlias www.dummy-host2.localhost
##ErrorLog "logs/dummy-host2.localhost-error.log"
##CustomLog "logs/dummy-host2.localhost-access.log" combined
##</VirtualHost>
Can anyone help me out please?
Thank you in advance, sir.
Rgds,
YOlkie
I have developed a website using XAMPP. The root folder is C:\Xampp\htdocs\website I already have a static IP as well as a registered domain name.
I need to know how do i point my public IP into XAMPP?
For example, my public IP (static) is 203.125.100.100
It is to be configured such that when visitors from anywhere types in http://203.125.100.100 in a browser, it will be pointed to the website hosted by the XAMPP server (NAT). The XAMPP server IP is 192.168.42.45 (Internal network)
I have already configured the rules inside my firewall: From external to Internal, doing a NAT 203.125.100.100 > 192.168.42.45, as well as unblocking port 80 and 403 (read it from somewhere you have to unblock port 403)
This is the config i edited, not sure if it is right:
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
NameVirtualHost 192.168.42.45:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost 192.168.42.45:80>
ServerAdmin yolkie@email.com
DocumentRoot "C:/xampp/htdocs/website"
ServerName 192.168.42.45
ErrorLog "C:/xampp/apache/logs/error1.log"
CustomLog "C:/xampp/apache/logs/access1.log" combined
</VirtualHost>
##<VirtualHost *:80>
##ServerAdmin postmaster@dummy-host2.localhost
##DocumentRoot "C:/xampp/htdocs/dummy-host2.localhost"
##ServerName dummy-host2.localhost
##ServerAlias www.dummy-host2.localhost
##ErrorLog "logs/dummy-host2.localhost-error.log"
##CustomLog "logs/dummy-host2.localhost-access.log" combined
##</VirtualHost>
Can anyone help me out please?
Thank you in advance, sir.
Rgds,
YOlkie