Author Topic: Virtual Hosting Adding multiple domain names in XAMPP question ???  (Read 712 times)

Tony

  • Administrator
  • Full Member
  • *****
  • Posts: 106
    • View Profile
Virtual Hosting Adding multiple domain names in XAMPP question ???

I am using XAMPP and wish to use free domain names supplied by http://www.no-ip.com/
My web hosting with cable ntl use dynamic ip address DHCP.
A few attempts to add an extra domain could not be seen outside my local host.   My first domain name works fine as a local host and externally can be seen anywhere on the internet.
Editing the httpd.conf and hosts file did not work I have made a mistake somewhere.  Does anyone have a similar setup that works with a sample script. ???
Regards Tony

Tony

  • Administrator
  • Full Member
  • *****
  • Posts: 106
    • View Profile
Re: Virtual Hosting Adding multiple domain names in XAMPP question ???
« Reply #1 on: April 23, 2009, 08:25:29 AM »
This problem still not resolved.
Had another try changing apache 2 httpd-vhost.conf  and  httpd.conf
-------------------------------------------------------------------------
#
#                              Virtual Hosts
#                     c:/xampp/apache/extra/httpd-vhost.conf:   
#                    unused # comments removed for readablity
#
#  using a ddns free domain from no-ip.com http://xampp/htdocs/myftp.org
#
#                              No-ip DUC loaded
#
#            windows xp professional with service pack 2
#
#  default xampp install works 100% with a standard install with both localhost & remote internet connection
# the email address is on different host
#  testing the following settings.
# required to work with both local PC  and remote internet access.
#
#
 <VirtualHost *:80>
 DocumentRoot c:/xampp/htdocs
 ServerName localhost
 ServerAdmin admin@localhost

#    ErrorLog logs/localhost-error_log.log
#    CustomLog logs/localhost-error_log.log common
 </VirtualHost>

   <VirtualHost *:80>
   ServerAdmin nospam@systems-edge.co.uk
   DocumentRoot c:/xampp/htdocs/g6xfu
   ServerName g6xfu.myftp.org
   ServerAlias http://g6xfu.myftp.org
  # ErrorLog logs/g6xfu/logs
  # CustomLog logs/g6xfu/logs.log common
   </VirtualHost>

     <VirtualHost *:80>
     ServerAdmin nospam@systems-edge.co.uk
     DocumentRoot c:/xampp/htdocs/systems-edge
     ServerName systems-edge.myftp.org
     ServerAlias http://systems-edge.myftp.org
    # ErrorLog logs/g6xfu/logs
    # CustomLog logs/g6xfu/logs.log common
     </VirtualHost>
#
#    \ changed to / to comply with linux

#  paths for my site c:/xampp/htdocs      (default localhost with my index.html)               
#  c:/xampp/htdocs/g6xfu/index.html  (my start page for  http://g6xfu.myftp.org)
#  c:/xampp/htdocs/systems-edge/index.html
#  (my start page for  http://systems-edge.myftp.org)
#    C:/xampp\htdocs/systems-edge/logs        (folder for error logs)
#  the script  in c:/xampp/apache/conf/httpd.conf needs enabling remove
#  the hash prompt in the following Virtual hosts.
#  Virtual hosts     Include c:/xampp/apache/extra/httpd-vhost.conf
#
#good luck
---------------------------------------------------------------------------
The above settings failed
(1)   could not launch the apache control panel
[tick] Apache (Running not displayed)
(2) localhost not working
(3) clicking on the xampp_start icon in the xampp folder came up with a error window problem in line 501 httpd.cnf
---------------------------------------------------------------------------
Does anyone have a working setup under windows apache xampp.
For addon domains that work with localhost and remote internet access.
I miss cpanel this could be acheived in less than a minute?????

Tony

  • Administrator
  • Full Member
  • *****
  • Posts: 106
    • View Profile
At long last the the add on domain is now working with windows xp xamppsystems-edge.myftp.org addon domain name
here is the new working script  :D

c:\xampp\apache\conf\extra

httpd-vhosts  file   



#
# 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 *: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 *:80>
   ServerAdmin your-email@address.co.uk
  DocumentRoot c:\xampp\htdocs
   ServerName g6xfu.myftp.org
   ErrorLog c:\xampp\htdocs\g6xfu.myftp.org.com-error_log
   CustomLog c:\xampp\htdocs\g6xfu.myftp.org-access_log common
</VirtualHost>
#
<VirtualHost *:80>
   ServerAdmin your-email@address.co.uk

  DocumentRoot c:\xampp\htdocs\systems-edge
   ServerName systems-edge.myftp.org
   ErrorLog c:\xampp\htdocs\systems-edge.myftp.org.com-error_log
   CustomLog c:\xampp\htdocs\systems-edge.myftp.org-access_log common
</VirtualHost>
##<VirtualHost *:80>
##    ServerAdmin webmaster@dummy-host.example.com
##    DocumentRoot /www/docs/dummy-host.example.com
##    ServerName dummy-host.example.com
##    ServerAlias www.dummy-host.example.com
##    ErrorLog @rel_logfiledir@/dummy-host.ex
##    CustomLog @rel_logfiledir@/dummy-host.example.com-access_log common
##</VirtualHost>

##<VirtualHost *:80>
##    ServerAdmin webmaster@dummy-host2.example.com
##    DocumentRoot /www/docs/dummy-host2.example.com
##    ServerName dummy-host2.example.com
##    ErrorLog @rel_logfiledir@/dummy-host2.example.com-error_log
##    CustomLog @rel_logfiledir@/dummy-host2.example.com-access_log common
##</VirtualHost>
----------------------------------------------

The httpd.conf is left at the default setting

happy computing
Tony