www.webdeveloper.com
Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 32

Thread: Viritual host

  1. #16
    Join Date
    Feb 2009
    Location
    Norway
    Posts
    67
    Quote Originally Posted by criterion9 View Post
    Maybe you need to add a "directory" section to each one since it won't be inheriting from a parent directory?
    Good idea
    I'll try it. Thanks!

  2. #17
    Join Date
    Jan 2009
    Posts
    3,346
    Alternatively you might try making your "Web-design" folder the document root in http.conf. That seems like it would make more sense to me. I'd try that first.

  3. #18
    Join Date
    Feb 2009
    Location
    Norway
    Posts
    67
    Quote Originally Posted by criterion9 View Post
    Alternatively you might try making your "Web-design" folder the document root in http.conf. That seems like it would make more sense to me. I'd try that first.
    I've done that haven't I ?

  4. #19
    Join Date
    Feb 2009
    Location
    Norway
    Posts
    67
    Ok,
    httpd-vhosts.conf:
    Code:
    #<Directory "C:\Documents and Settings\Geir\My Documents\Web-design">
    #Options Indexes FollowSymLinks MultiViews
    #AllowOverride None
    #Order allow,deny
    #allow from all</Directory>
    
    <VirtualHost *:80>
    ServerName localhost
    ServerAdmin youremail@domain
    DocumentRoot "C:/Webserver/"
    ServerPath /
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    </Directory>
    <Directory C:/Webserver/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    </Directory>
    </VirtualHost>
    
    <VirtualHost *:80>
    ServerAdmin youremail@domain
    DocumentRoot "C:/Documents and Settings/Geir/My Documents/Web-design/G-Sun 2009/"
    ServerName G-Sun2009
    ServerPath "/G-Sun 2009"
    <Directory "C:/Documents and Settings/Geir/My Documents/Web-design/G-Sun 2009/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    </Directory>
    </VirtualHost>
    
    <VirtualHost *:80>
    ServerAdmin youremail@domain
    DocumentRoot "C:/Documents and Settings/Geir/My Documents/Web-design/Flyt/"
    ServerName flyt
    ServerPath /Flyt
    <Directory "C:/Documents and Settings/Geir/My Documents/Web-design/Flyt/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    </Directory>
    </VirtualHost>
    No change..
    The localhost section looks a little messy to me. Is the double directory-section right?

    Thanks!

  5. #20
    Join Date
    Jan 2009
    Posts
    3,346
    I don't think you need this part:
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    </Directory>

  6. #21
    Join Date
    Feb 2009
    Location
    Norway
    Posts
    67
    Tried:
    Code:
    <VirtualHost *:80>
    ServerName localhost
    ServerAdmin youremail@domain
    #DocumentRoot "C:/Webserver/"
    DocumentRoot "C:/Documents and Settings/Geir/My Documents/Web-design/G-Sun 2009/"
    #ServerPath "C:/Webserver/"
    ServerPath "/G-Sun 2009"
    #<Directory />
    #Options FollowSymLinks
    #AllowOverride None
    #</Directory>
    <Directory C:/Webserver/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    </Directory>
    </VirtualHost>
    And then everything serves me "/G-Sun 2009/" ..

  7. #22
    Join Date
    Jan 2009
    Posts
    3,346
    Try this in your localhost and see what it does:
    DocumentRoot "C:/Documents and Settings/Geir/My Documents/Web-design/"
    ServerPath "/"
    Also use that same document root in your httpd.conf.

  8. #23
    Join Date
    Feb 2009
    Location
    Norway
    Posts
    67
    It gives me the index of /Web-design/

  9. #24
    Join Date
    Jan 2009
    Posts
    3,346
    Are you editing the correct hosts file? What version of windows are you using?

  10. #25
    Join Date
    Feb 2009
    Location
    Norway
    Posts
    67
    It's xp sp3
    and the hosts-file is:
    c:\windows\system32\drivers\etc\hosts

  11. #26
    Join Date
    Jan 2009
    Posts
    3,346
    What happens when you ping one of your hosts entries?

  12. #27
    Join Date
    Feb 2009
    Location
    Norway
    Posts
    67
    Quote Originally Posted by criterion9 View Post
    What happens when you ping one of your hosts entries?
    You mean when I type http://flyt/ and http://g-sun2009/ in my browser and press enter?
    I come to what I localhost is set to. Now, the index of
    "C:/Documents and Settings/Geir/My Documents/Web-design/"

    Thanks!

  13. #28
    Join Date
    Jan 2009
    Posts
    3,346
    No. I meant open up cmd and type
    Code:
    ping flyt
    What does the output say?

  14. #29
    Join Date
    Feb 2009
    Location
    Norway
    Posts
    67
    Quote Originally Posted by criterion9 View Post
    What does the output say?
    It says:
    Code:
    C:\Documents and Settings\Geir>ping flyt
    
    Pinging flyt [10.0.0.1] with 32 bytes of data:
    
    Reply from 10.0.0.1: bytes=32 time<1ms TTL=128
    Reply from 10.0.0.1: bytes=32 time<1ms TTL=128
    Reply from 10.0.0.1: bytes=32 time<1ms TTL=128
    Reply from 10.0.0.1: bytes=32 time<1ms TTL=128
    
    Ping statistics for 10.0.0.1:
        Packets: Sent = 4, Received = 4, Lost = 0 (0
    Approximate round trip times in milli-seconds:
        Minimum = 0ms, Maximum = 0ms, Average = 0ms

  15. #30
    Join Date
    Jan 2009
    Posts
    3,346
    Ok. We can eliminate the hosts file as the problem. What does your httpd.conf look like?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles