Find the answer to your Linux question:
Results 1 to 2 of 2
Hi All, This is my last port of call i think.... tried everything stated in tut's & still cant work it out. I have a VPS with VaServ and after ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2009
    Posts
    1

    Apache <VirtualHost> problems!!


    Hi All,

    This is my last port of call i think.... tried everything stated in tut's & still cant work it out.

    I have a VPS with VaServ and after their little mishap, they have given us all new VPS' but they havent set anything up on them!! (Apart from the basic Distro (CentOS) & apache!)

    I have installed WebMin and i have all my DNS records setup, i have also "added" the virtualhosts.

    The problem i am having is, i have 2 domains in there. urla & urlb

    But no matter what one i point my browser to, it only shows up the index *dot* html in the 2e1ick root directory.

    According to various tut's i have to place the following in my httpd *dot* conf:

    Code:
    <VirtualHost *:80>
    DocumentRoot /home/urla/
    ServerName urla
    ServerAdmin admin at urla
    ServerAlias *.urla
    </VirtualHost>
    
    <VirtualHost *:80>
    DocumentRoot /home/urlb/
    ServerName urlb
    ServerAdmin admin at urlb
    ServerAlias *.urlb
    </VirtualHost>
    But i dont think this is right.

    If i do this:

    Code:
    <VirtualHost *:80>
    DocumentRoot /home/urla/
    ServerName urla
    ServerAdmin admin at urla
    ServerAlias *.urla
    </VirtualHost>
    
    <VirtualHost {MY_IP_HERE}:80>
    DocumentRoot /home/urlb/
    ServerName urlb
    ServerAdmin admin at urlb
    ServerAlias *.urlb
    </VirtualHost>
    Then it will allow me to view the atvshack index *dot* html but after i refresh the page it goes back to the 2e1ick index *dot* html.



    Sorry if i dont make much sense, just ask me if you need to know anything

    Look forward to your replies.

    Best wishes,
    Mike

  2. #2
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    you need another directive above the vhost containers
    apache name based virtual host - Google Search

Posting Permissions

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