Find the answer to your Linux question:
Results 1 to 2 of 2
Hi all I am having trouble setting up name based virtual hosting on my Linux Webserver. I have two websites: I need the lowcostchemicals site to use a SSL certificate ...
  1. #1
    Just Joined!
    Join Date
    Jan 2009
    Location
    Shropshire, UK
    Posts
    4

    Virtual hosts in httpd.conf

    Hi all

    I am having trouble setting up name based virtual hosting on my Linux Webserver. I have two websites:


    I need the lowcostchemicals site to use a SSL certificate which I have already created and added to a folder /var/www/websites/ssl/l/lowcostchemicals.co.uk/

    The lowcostchemicals site needs to go into the folder: /var/www/websites/l/lowcostchemicals.co.uk
    The peteandsteph.co.uk site needs to go into the folder /var/www/websites/p/peteandsteph.co.uk

    I have tried to set up the virtual hosts but all of the sites go to the root folder: var/www/html/

    Can anyone help?

    Many thanks
    Pete

  2. #2
    Linux Newbie
    Join Date
    Apr 2010
    Location
    Novosibirsk, Russia
    Posts
    136
    Apache Virtual Host documentation - Apache HTTP Server
    VirtualHost Examples - Apache HTTP Server
    Name-based Virtual Host Support - Apache HTTP Server

    The 'DocumentRoot' for each vhost must work properly.

    What about SSL & virtual hosts:

    Code:
    IP-based virtual hosts use the IP address of the connection to determine 
    the correct virtual host to serve. Therefore you need to have a separate IP 
    address for each host. With name-based virtual hosting, the server relies 
    on the client to report the hostname as part of the HTTP headers. Using this 
    technique, many different hosts can share the same IP address.
    
    Name-based virtual hosting is usually simpler, since you need only configure 
    your DNS server to map each hostname to the correct IP address and then configure
     the Apache HTTP Server to recognize the different hostnames. Name-based virtual 
    hosting also eases the demand for scarce IP addresses. Therefore you should use 
    name-based virtual hosting unless there is a specific reason to choose IP-based virtual
     hosting. Some reasons why you might consider using IP-based virtual hosting:
    ...
        * Name-based virtual hosting cannot be used with SSL secure servers because of 
    the nature of the SSL protocol.
    ...
    That's answers onto your question I suppose )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...