#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    UK
    Posts
    14
    Rep Power
    0
    hi

    i have installed RedHat Linux 6.2 with Apache 1.3.12

    what i need to be able to do is uploaded all my sites to the new server in virtual hosts and be able to access them via IE.

    is it possible to use www.sitename.com

    or do i have to use IP address

    i have been through the Apache manual on virtual hosts, but still with no luck

    thanks in advance :]

    Jonny
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>be able to do is uploaded all my sites to the new server in virtual hosts

    What do you mean? Are you trying to migrate your existing sites from elsewhere to your local web server and keeping the same domain names?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    UK
    Posts
    14
    Rep Power
    0
    i want to be able to set all my sites up on my local server.. and access them via a links page

    when i setup the first virtual host it all works fine using http://112.112.112.11/site/www to access it, as soon as i set up the next site they dont work

    it seems to take the first site as the default

    :[
  6. #4
  7. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>i want to be able to set all my sites up on my local server

    So are you using Name-based vhost?

    >>the first virtual host it all works fine using http://112.112.112.11/site/www

    There was a configure problem obviously.

    Show us all your <VirtualHost> blocks.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    UK
    Posts
    14
    Rep Power
    0
    i must stress that this linux box is kept offline for testing purposes.. i just want to be able to access various sites to work on them offline.

    NameVirtualHost 112.112.112.3

    <VirtualHost 112.112.112.3>
    ServerAdmin admin@localhost
    ServerName fishomania
    VirtualDocumentRoot /home/sites/fishomania
    ScriptAlias /cgi/bin/ /home/sites/fishomania/cgi-bin
    Options ExecCgi Includes IncludesNOEXEC Indexes
    </VirtualHost>

    <VirtualHost 112.112.112.3>
    ServerAdmin admin@localhost
    ServerName elitewebdesigns
    VirtualDocumentRoot /home/sites/%0
    ScriptAlias /cgi/bin/ /home/sites/elitewebdesigns/cgi-bin
    Options ExecCgi Includes IncludesNOEXEC Indexes
    </VirtualHost>

    <VirtualHost 112.112.112.3>
    ServerAdmin admin@localhost
    ServerName up-loaded
    DocumentRoot /home/sites/up-loaded
    ScriptAlias /cgi/bin/ /home/sites/up-loaded/cgi-bin
    Options ExecCgi Includes IncludesNOEXEC Indexes
    </VirtualHost>

    <VirtualHost 112.112.112.3>
    ServerAdmin admin@localhost
    ServerName dolphinmania
    DocumentRoot /home/sites/dolphinmania
    ScriptAlias /cgi/bin/ /home/sites/dolphinmania/cgi-bin
    Options ExecCgi Includes IncludesNOEXEC Indexes
    </VirtualHost>

    <VirtualHost 112.112.112.3>
    ServerAdmin admin@localhost
    ServerName petersstationery
    DocumentRoot /home/sites/petersstationery
    ScriptAlias /cgi/bin/ /home/sites/petersstationery/cgi-bin
    Options ExecCgi Includes IncludesNOEXEC Indexes
    </VirtualHost>

    <VirtualHost 112.112.112.3>
    ServerAdmin admin@localhost
    ServerName snowblind
    DocumentRoot /home/sites/snowblind
    ScriptAlias /cgi/bin/ /home/sites/snowblind/cgi-bin
    Options ExecCgi Includes IncludesNOEXEC Indexes
    </VirtualHost>

    <VirtualHost 112.112.112.3>
    ServerAdmin admin@localhost
    ServerName younghosting
    DocumentRoot /home/sites/younghosting
    Options ExecCgi Includes IncludesNOEXEC Indexes
    </VirtualHost>
  10. #6
  11. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>NameVirtualHost 112.112.112.3

    So don't use IP address to access your sites.

    >>i have been through the Apache manual on virtual hosts, but still with no luck

    Unfortunately, this link -> "Multiple local hostnames ??" http://www.devshed.com/Talk/Forums/F...ML/000142.html has been removed so I guess I will repost it using a quick and dirty way.

    Edit /etc/hosts file:
    112.112.112.3 www.sitename.com fishomania elitewebdesigns up-loaded dolphinmania petersstationery...

    Now try to use http://fishomania to access to your sites.
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    UK
    Posts
    14
    Rep Power
    0
    cheers for the help

    but i get a "page cannot be displayed" when i try and access any site through http://site/

    i am probably setting up apache completely wrong :]

    ta anywayz
  14. #8
  15. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    You can't use IE. You need to access to your vhost sites from within your redhat box.
  16. #9
  17. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    1
    Rep Power
    0
    Try setting the Virtual hosts like below, each with it's own name in the VirtualHost Tag.
    On your web browser machine, make sure it will resolve each name to the same IP address.
    IE Put them all in your hosts file or configure your DNS server accordingly.

    You must now access the sites by name, and apache will resolve them appropriately
    IE http://www.site1

    Hope this helps.

    <VirtualHost 112.112.112.3 www.site1>
    ServerAdmin admin@localhost
    </VirtualHost>

    <VirtualHost 112.112.112.3 www.site2>
    ServerAdmin admin@localhost
    </VirtualHost>

    <VirtualHost 112.112.112.3 www.site3>
    ServerAdmin admin@localhost
    </VirtualHost>


    ------------------
    Euan de Kock
    Gekko Services (Pvt) Ltd
  18. #10
  19. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    2
    Rep Power
    0
    Don't forget that this kind of name-based virtual hosting depends on HTTP host headers, which are a feature of HTTP 1.1. So make sure your browser's "use HTTP1.1" option is turned on, if it has one.

IMN logo majestic logo threadwatch logo seochat tools logo