httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luis Moreira <luis.more...@esinnovation.pt>
Subject Re: [users@httpd] virtual host
Date Wed, 28 Jan 2004 14:40:54 GMT
There's a bit of confusion, here.

This declares a virtual host NAMED "pomodoro", not a directory

<VirtualHost pomodoro>
    ServerAdmin webmaster@pomodoro.it
    DocumentRoot /www/pomodoro
    ServerName localhost:81
</VirtualHost>

To access a Directory under your "root", you need a "Directory" directive, such as 

<Directory root-name/pomodoro/>
 Options Indexes (displays contents if directory is accessed by name)
      Order allow,deny
      Allow from all
 AuthType Basic
 AuthName "MSG4USER"
 AuthUserFile "your-auth-file"
 Require user xxx
</Directory>


You can state <VirtualHost ip-address:81> to specify that this VH is reached through
port 81

>From the docs :
BindAddress and Listen do not implement Virtual Hosts. They tell the main Apache daemon process
what addresses and ports to bind and listen on. If no <VirtualHost> directives are used,
the server will behave the same for all accepted requests. However, <VirtualHost> can
be used to specify a different behavior for one or more of the addresses and ports. To implement
a VirtualHost, the server must: 
  a.. Be told to Listen to the desired address and port 
  b.. Have a <VirtualHost> section created for the specified address and port to set
the behavior of this virtual host 

Anyway, read the docs for VH at http://www.apache.org/docs/vhosts 


Luis

  ----- Original Message ----- 
  From: Francesca@simply.it 
  To: users@httpd.apache.org 
  Sent: Wednesday, January 28, 2004 1:33 PM
  Subject: [users@httpd] virtual host




    Hi,
    I have to set Virtual Hosts on my server but I'm not able.
    I tried a lot of time on my web server and it is dangerous for my websites because they
were off line for much times.
    So I'm trying with a local computer, that has the same configuration.
    I've windows 2000 serverm IIS on port 80 and Apache on port 81

    In the config file I set htdocs as document root.
    In the Apache Folder I've created a folder www and a subfolder of this "pomodoro".

    I have set the Virtual Host as follow:


    BindAddress *
    Port 81
    <VirtualHost pomodoro>
        ServerAdmin webmaster@pomodoro.it
        DocumentRoot /www/pomodoro
        ServerName localhost:81
    </VirtualHost>

    I want try in local, so if I go to the http://localhost:81 page It's ok!
    But how can I see my pomodoro folder?
    If I go to http://localhost:81/pomodoro The page is not found, and The error log of Apache
tell me that folder "pomodoro" in htdocs dosn't exist!
    Obviosly It is in www folder!!!
    What can I do?

    When I restart Apache there is an error: apache can not resolve host pomodoro...

    What I have to do?
    I dont' know anything about DNS, and this is a local test!!!

    Thank you!
    Francesca (I'm sorry for my bad english!!!)

Mime
View raw message