SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: VirtualHost

  1. #1
    SitePoint Enthusiast
    Join Date
    May 2001
    Location
    USA
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry VirtualHost

    I have an Apache Web Server running here on my computer and I'm trying to get cirtualhost to work, but everywhere I post a message, someone replies but it never works. So I'm going to try here.
    This is what I want..
    1.1.1.1 - My default website
    1.1.1.1:80 - My Port 80 Secondary Site

    This is what I have gotten so far from posts on other forums:

    Port 80
    Listen 80
    Listen 81

    # You don't need to specify port 80 below
    NameVirtualHost 1.1.1.1

    <VirtualHost 1.1.1.1>
    ServerName 1.1.1.1
    DocumentRoot "C:\program files\apache group\apache\htdocs"
    </VirtualHost>

    <VirtualHost 1.1.1.1:81>
    ServerName 1.1.1.1
    DocumentRoot "C:\program files\apache group\apache\www2"
    </VirtualHost>


    And this is my results:
    When I got to: 1.1.1.1 it loads my site fine.
    But hwen I go to: 1.1.1.1:80 it loads my site but it loads the 1.1.1.1 site instead of the port 80 website. I have also noticed that when I change the DocumentRoot for the 1.1.1.1 virtualhost it doesn't even effect it. It still uses the DocumentRoot from the other one (the one not inside of the virtualhost.)

    Can anyone help me with this? Thanks

    Oh and I did replace 1.1.1.1 with my real ip address. I'd rather not give out my real one right now.
    Last edited by Chad; Feb 17, 2002 at 13:51.
    Chad Crouch
    http://chadmc.com

  2. #2
    Are you ready for BSD? Marshall's Avatar
    Join Date
    Dec 2001
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're confused. 1.1.1.1 == 1.1.1.1:80 since 80 is the default port for HTTP traffic. Maybe you mean 1.1.1.1:81 ?

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2001
    Location
    USA
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    actually I figured this out quite a long time ago. If I just replace my ip with * it works. So I make a virtualhost with: *:80
    Chad Crouch
    http://chadmc.com


Bookmarks

Posting Permissions

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