httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <Owen.Bo...@swx.com>
Subject RE: [users@httpd] virtual host
Date Wed, 28 Jan 2004 15:12:02 GMT
> -----Original Message-----
> From: francesca [mailto:francesca@simply.it]
> Sent: Mittwoch, 28. Januar 2004 14:55
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] virtual host
> 
> 
> Yes I read the documentation.
> I have a webserver with a lot of domains.
> Because I'm not able to set VH, I want study the 
> configuration in a local
> server and then test it to my webserver!
> 
> I want use the name based Virtual Hosts...

Ok. Then you have to be able to define different hostnames pointing to the same IP address.
Since you say that you don't know anything about DNS, that makes things difficult.

Name-based VH allows you to have many websites with different name on the same IP. You (or
your ISP) has to set up DNS so that the different hostnames resolve to your single IP. 

Since you read the documentation, can you say what bit you did not understand? You should
set up your config as described, ie;

    NameVirtualHost *

    <VirtualHost *>
    ServerName www.domain.tld
    DocumentRoot /www/domain
    </VirtualHost>

    <VirtualHost *>
    ServerName www.otherdomain.tld
    DocumentRoot /www/otherdomain
    </VirtualHost>

Why did you use "pomodoro" as an argument to VirtualHost? This is not a good idea since apache
has to resolve pomodoro to an IP address before it can use it and if DNS is not working, your
apache will not start.

Do you understand that once you set up NBVH, you can refer to the *site* using the hostname.
That is, you do not say http://localhost... but you say http://pomodoro/  BUt for this to
work, the hostname pomodoro has to resolve to your IP address (or to 127.0.0.1) if you want
to test it locally. For windows, you have to put:

127.0.0.1 pomodoro

in your HOSTS file, at least. Or set it up in DNS...

Read below for more detailed comments...

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

> 
> Thanks
> 
> ----- Original Message -----
> From: "Boyle Owen" <Owen.Boyle@swx.com>
> To: <users@httpd.apache.org>
> Sent: Wednesday, January 28, 2004 2:53 PM
> Subject: RE: [users@httpd] virtual host
> 
> 
> Plain text please...
> 
> Your config is very confused - I don't understand what you want to do.
> Please answer the following questions first:
> 
> - Why do you want to use VirtualHosts (VH)?
> 
> - What type of VH do you want?
> - IP-based?
> - port-based?
> - name-based?
> 
> - Did you read http://httpd.apache.org/docs/vhosts/index.html?
> 
> Rgds,
> Owen Boyle
> Disclaimer: Any disclaimer attached to this message may be ignored.
> 
> Diese E-mail ist eine private und persönliche Kommunikation. Sie hat
> keinen Bezug zur Börsen- bzw. Geschäftstätigkeit der SWX Gruppe. This
> e-mail is of a private and personal nature. It is not related to the
> exchange or business activities of the SWX Group. Le présent 
> e-mail est
> un message privé et personnel, sans rapport avec l'activité 
> boursière du
> Groupe SWX.
> 
> 
> 
> 
> -----Original Message-----
> From: Francesca@simply.it [mailto:francesca@simply.it]
> Sent: Mittwoch, 28. Januar 2004 14:33
> To: users@httpd.apache.org
> 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 *

This directive is deprecated. Just remove it since it is not doing anything more than the
default.

> Port 81

OK - or use "Listen 81" which is the same thing but more modern.

> <VirtualHost pomodoro>

Not good - use an IP address or wildcard here, not a hostname since if DNS is broken, apache
won't start.

>     ServerAdmin webmaster@pomodoro.it

OK - but a bit early; do you expect to get a lot of mails from users at the moment?

>     DocumentRoot /www/pomodoro

OK - and essential.

>     ServerName localhost:81

Not OK - you are supposed to put the name of the name-based host here. eg,

ServerName pomodoro

> </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!

well it doesn't  - I presume localhost:81 is being served from the base-level server which
has a default docroot

> Obviosly It is in www folder!!!

obvious to you, not to apache...

> What can I do?
> 
> 
> When I restart Apache there is an error: apache can not resolve host
> pomodoro...
> I dont' know anything about DNS, and this is a local test!!!

I don't think you really understand the concept of name-based virtual hosts. It is strongly
connected to DNs etc. If you don't understand the relationship between IPs and hostnames you
will not get this to work.

> 
> 
> What I have to do?
> 
> 
> Thank you!
> Francesca (I'm sorry for my bad english!!!)
> 
> This message is for the named person's use only. It may contain
> confidential, proprietary or legally privileged information. No
> confidentiality or privilege is waived or lost by any mistransmission.
> If you receive this message in error, please notify the 
> sender urgently
> and then immediately delete the message and any copies of it from your
> system. Please also immediately destroy any hardcopies of the message.
> You must not, directly or indirectly, use, disclose, 
> distribute, print,
> or copy any part of this message if you are not the intended 
> recipient.
> The sender's company reserves the right to monitor all e-mail
> communications through their networks. Any views expressed in this
> message are those of the individual sender, except where the message
> states otherwise and the sender is authorised to state them to be the
> views of the sender's company.
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message