Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

two vhost problem

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  emails queued until reboot  
Author Message
misiek

External


Since: Feb 01, 2006
Posts: 8



(Msg. 1) Posted: Tue Feb 14, 2006 12:30 pm
Post subject: two vhost problem
Archived from groups: alt>apache>configuration (more info?)

I got two domain registered for example with networksolutions.com which
are...

firstdomain.com and IP 111.111.11.111
seconddomain.com and IP 111.111.11.111

my vhosts looks like

01_firstdomain.com_vhost.conf

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/ftp/workspace/firstdomain.com
Servername firstdomain.com
</VirtualHost>

and

02_seconddomain.com_vhost.conf

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/ftp/workspace/seconddomain.com
Servername seconddomain.com
</VirtualHost>

and /etc/hosts
111.111.11.111 firstdomain.com
111.111.11.111 seconddomain.com

I was trying <VirtualHost 111.111.11.111:80> also

now should works ? or not ? because it does not ...
what I need to get it works ?

OS gentoo
net-www/apache-2.0.54-r31

 >> Stay informed about: two vhost problem 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Tue Feb 14, 2006 2:55 pm
Post subject: Re: two vhost problem [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

This message is not archived

 >> Stay informed about: two vhost problem 
Back to top
Login to vote
misiek

External


Since: Feb 01, 2006
Posts: 8



(Msg. 3) Posted: Tue Feb 14, 2006 2:55 pm
Post subject: Re: two vhost problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Davide Bianchi wrote:
> On 2006-02-14, misiek <michaelaugustyniak.TakeThisOut@gazeta.pl> wrote:
>
>>my vhosts looks like
>>
>>01_firstdomain.com_vhost.conf
>
>
> And do you have a NameVirtualHost *:80 somewhere in your httpd.conf?
> Because if you don't, the VHost are not used.
>
>

yea wneh I put NameVirtualHost to that files I got a message


[Tue Feb 14 13:10:35 2006] [error] VirtualHost www.seconddomain.com:0 --
mixing * ports and non-* ports with a NameVirtualHost address is not
supported, proceeding with undefined results
[Tue Feb 14 13:10:35 2006] [error] VirtualHost www.firstdomain.com:0 --
mixing * ports and non-* ports with a NameVirtualHost address is not
supported, proceeding with undefined results
[Tue Feb 14 13:10:35 2006] [warn] NameVirtualHost 111.111.11.111:80 has
no VirtualHosts

NameVirtualHost 111.111.11.111:80
<VirtualHost www.firstdomain.com>
ServerAdmin webmaster@localhost
DocumentRoot /home/ftp/workspace/firstdomain.com
Servername www.firstdomain.com
</VirtualHost>

~

NameVirtualHost 111.111.11.111:80
<VirtualHost www.seconddomain.com>
ServerAdmin webmaster@localhost
DocumentRoot /home/ftp/workspace/seconddomain.com
Servername www.seconddomain.com
</VirtualHost>
 >> Stay informed about: two vhost problem 
Back to top
Login to vote
Robert Ionescu

External


Since: Jan 19, 2006
Posts: 142



(Msg. 4) Posted: Tue Feb 14, 2006 3:55 pm
Post subject: Re: two vhost problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

try to append the port www.firstdomain.com:80 like

NameVirtualHost 111.111.11.111:80
<VirtualHost www.firstdomain.com:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/ftp/workspace/firstdomain.com
Servername www.firstdomain.com
</VirtualHost>

NameVirtualHost 111.111.11.111:80
<VirtualHost www.seconddomain.com:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/ftp/workspace/seconddomain.com
Servername www.seconddomain.com
</VirtualHost>

--
Robert
 >> Stay informed about: two vhost problem 
Back to top
Login to vote
misiek

External


Since: Feb 01, 2006
Posts: 8



(Msg. 5) Posted: Tue Feb 14, 2006 3:55 pm
Post subject: Re: two vhost problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Robert Ionescu wrote:
> try to append the port www.firstdomain.com:80 like
>
> NameVirtualHost 111.111.11.111:80
> <VirtualHost www.firstdomain.com:80>
> ServerAdmin webmaster@localhost
> DocumentRoot /home/ftp/workspace/firstdomain.com
> Servername www.firstdomain.com
> </VirtualHost>
>
> NameVirtualHost 111.111.11.111:80
> <VirtualHost www.seconddomain.com:80>
> ServerAdmin webmaster@localhost
> DocumentRoot /home/ftp/workspace/seconddomain.com
> Servername www.seconddomain.com
> </VirtualHost>
>

no I got that message
[Tue Feb 14 13:28:33 2006] [warn] NameVirtualHost
www.seconddomain.com:80 has no VirtualHosts


why only second whh\en firsdomain is configured the same

before that on short time was wroking now it does not ??
 >> Stay informed about: two vhost problem 
Back to top
Login to vote
Steve

External


Since: Jan 16, 2006
Posts: 35



(Msg. 6) Posted: Tue Feb 14, 2006 11:55 pm
Post subject: Re: two vhost problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Tue, 14 Feb 2006 13:14:14 -0600, misiek wrote:

> Davide Bianchi wrote:
>> On 2006-02-14, misiek <michaelaugustyniak.DeleteThis@gazeta.pl> wrote:
>>
>>>my vhosts looks like
>>>
>>>01_firstdomain.com_vhost.conf
>>
>>
>> And do you have a NameVirtualHost *:80 somewhere in your httpd.conf?
>> Because if you don't, the VHost are not used.
>>
>>
>
> yea wneh I put NameVirtualHost to that files I got a message
>
>
> [Tue Feb 14 13:10:35 2006] [error] VirtualHost www.seconddomain.com:0 --
> mixing * ports and non-* ports with a NameVirtualHost address is not
> supported, proceeding with undefined results
> [Tue Feb 14 13:10:35 2006] [error] VirtualHost www.firstdomain.com:0 --
> mixing * ports and non-* ports with a NameVirtualHost address is not
> supported, proceeding with undefined results
> [Tue Feb 14 13:10:35 2006] [warn] NameVirtualHost 111.111.11.111:80 has
> no VirtualHosts
>
> NameVirtualHost 111.111.11.111:80
> <VirtualHost www.firstdomain.com>
> ServerAdmin webmaster@localhost
> DocumentRoot /home/ftp/workspace/firstdomain.com
> Servername www.firstdomain.com
> </VirtualHost>
>
> ~
>
> NameVirtualHost 111.111.11.111:80
> <VirtualHost www.seconddomain.com>
> ServerAdmin webmaster@localhost
> DocumentRoot /home/ftp/workspace/seconddomain.com
> Servername www.seconddomain.com
> </VirtualHost>

OK, this is thae way I do it, and I seem to be permanently answering this
one!

1. Set up either yout local dns or /etc/hosts so that www.firstdomain.com
and www.seconddomain.com resolve to 111.111.11.111 ( personally, I'd use a
proper non-routable IP address, not this ).

In the httpd.conf, use the following section:

NameVirtualHost 111.111.11.111:80
<VirtualHost www.firstdomain.com>
ServerAdmin webmaster@localhost
DocumentRoot /home/ftp/workspace/firstdomain.com
Servername www.firstdomain.com
</VirtualHost>

<VirtualHost www.seconddomain.com>
ServerAdmin webmaster@localhost
DocumentRoot /home/ftp/workspace/seconddomain.com
Servername www.seconddomain.com
</VirtualHost>

Note that there's only one NameVirtualHost statement. If this starts up
cleanly, then it should work!

I think the only mistake in httpd.conf is the extra NameVirtualHost,
which defines separate blocks of virtual hosts.

Steve
 >> Stay informed about: two vhost problem 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Problem with vhost definitions - I have two web sites listed in the vhosts.conf file. I also have listen.conf set. However when I fo to the second website listed in the vhosts.conf file, I get the web page for the first. I have looked at the access logs as well as the error logs,....

apache 2.0.47 on windows - vhost config problem - I've got a problem with configuration of vhost it's my http.config: NameVirtualHost * #---------------------------- VHosts ------------ <VirtualHost *> ServerAdmin webmaster@samba.local.pl DocumentRoot "C:/http/vhost0/htdocs" ...

DAV in vhost - Hello, I followed a dav guide and succeeded in a way that allows me to connect to a secured area. ssl.conf: <VirtualHost _default_:443> Alias /webdav/ "/home/webdav/" <Directory /home/webdav> DAV on AuthType Basic AuthNam...

VHOST or ...? - Hi, I'm a newbie on Apache, so I need help figuring out what to do when I have one webserver with one IP-address and I want to have two sites: "www.mydomain.com" and "site2.mydomain.com". The first site should respond when you type a...

VHOST - I have the domain nj2t.net allready up and running, I have just got nj2t.co.uk, can I just copy the virtual host entry for nj2t.net and paste it in as a new VHost entry and change the web parts from .net to .co.uk and keep using the same directories........
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]