You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Uwe Dippel <ud...@uniten.edu.my> on 2008/09/24 09:14:16 UTC

[users@httpd] Virtual Hosts - main site disappears with vhosts

I have been working on this, reading the documentation, googled, but 
haven't found the solution:

I administrate foo.bar.edu.my. Until now, it is one CMS. In future, we 
want to use more, so I tried vhosts.

This is what I added to hhtpd.conf:

> diff httpd.conf.novirtual httpd.conf                                                                                                                                        
> 974a975,991
>> 
>> NameVirtualHost * 
>> 
>>     <VirtualHost *>
>>     ServerName foo.bar.edu.my
>>     DocumentRoot /var/www/htdocs
>>     </VirtualHost>
>> 
>>     <VirtualHost *>
>>     ServerName 2ndfoo.bar.edu.my 
>>     DocumentRoot /var/www/htdocs/2ndfoo
>>     </VirtualHost>
>> 
>>     <VirtualHost *>
>>     ServerName anotherfoo.bar.edu.my
>>     DocumentRoot /var/www/htdocs/anotherfoo
>>     </VirtualHost>

Now, 2ndfoo.bar.edu.my and anotherfoo.bar.edu.my show up as expected.
But the main site, foo.bar.edu.my, is gone. Pointing the browser to it, 
brings me to some Google search site for a strange intsvr:

> $ lynx foo.bar.edu.my
> 
> Looking up foo.bar.edu.my first
> Looking up foo.bar.edu.my
> Making HTTP connection to foo.bar.edu.my
> Sending HTTP request.
> HTTP request sent; waiting for response.
> HTTP/1.1 301 Moved Permanently
> 'A'lways allowing from domain 'foo.bar.edu.my'.
> Data transfer complete
> HTTP/1.1 301 Moved Permanently
> Using http://intsvr/CIP/v3/
> Looking up intsvr
> Unable to locate remote host intsvr.
> Alert!: Unable to connect to remote host.

This looks like some DNS-problem to me. Still, with the original 
httpd.conf all is fine for foo.bar.edu.my.
How could the DNS come in, after Apache has been contacted, and the 
VirualHost directives serviced?

We are running Apache 1.3.29 on OpenBSD.

Any help with this problem will be highly appreciated, thanks!

Uwe


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


Re: [users@httpd] Virtual Hosts - main site disappears with vhosts

Posted by Uwe Dippel <ud...@uniten.edu.my>.
Davide Bianchi wrote:

> Whenever I try to see that URL, I get a 302 redirecting me to /v2/,
> maybe that is the problem. How about setting THAT as your DocumentRoot
> instead of plain-old /var/www/htdocs ?

Tried it, but doesn't help.
Sorry, let's take a break on this problem. The future and additional 
sites are not in our public DNS yet, so there is no point to load the 
httpd.conf with the vhosts.
I had been hoping to solve the problem, using it on the inside only, 
before making it public.

I'll come back to the list later, when the public zone files have been 
updated, and the base site still is not reachable.

Thanks for the moment!

Uwe


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


Re: [users@httpd] Virtual Hosts - main site disappears with vhosts

Posted by Davide Bianchi <da...@onlyforfun.net>.
Uwe Dippel wrote:
> We are running the old version now, to have the current content accessible.

Whenever I try to see that URL, I get a 302 redirecting me to /v2/,
maybe that is the problem. How about setting THAT as your DocumentRoot
instead of plain-old /var/www/htdocs ?

Davide


-- 
Gentlemen, Chicolini here may look like an idiot, and talk like
an idiot, but don't let that fool you. He really /is/ an idiot.
-- Julius Henry "Groucho" Marx (http://en.wikiquote.org/wiki/Groucho_Marx)

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


Re: [users@httpd] Virtual Hosts - main site disappears with vhosts

Posted by Uwe Dippel <ud...@uniten.edu.my>.
Davide Bianchi wrote:

> Yes, exactly, it is a PUBLICLY ACCESSIBLE url, and the fast way to test
> something is just to look at it. So why hiding it?

Okay, no problem. If this can be of any help?

http://coit.uniten.edu.my

We are running the old version now, to have the current content accessible.

Uwe



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


Re: [users@httpd] Virtual Hosts - main site disappears with vhosts

Posted by Davide Bianchi <da...@onlyforfun.net>.
Uwe Dippel wrote:
> 
> I simply didn't want to invite too many people; it is a publicly
> accessible FQDN.

Yes, exactly, it is a PUBLICLY ACCESSIBLE url, and the fast way to test
something is just to look at it. So why hiding it?

>> And what is the httpd.conf BEFORE the
>> changes?
> 
> I was afraid, it might be too long. Now it is attached.

In your httpd.conf, just after the 'DocumentRoot' there is:

DocumentRoot "/var/www/htdocs"

RewriteEngine on
RewriteRule   ^/$  /v2/  [R]

Maybe the problem is that your 'RewriteRule' now doesn't do anything
anymore?

Davide

-- 
Linux: the operating system with a CLUE... Command Line User Environment

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


Re: [users@httpd] Virtual Hosts - main site disappears with vhosts

Posted by Uwe Dippel <ud...@uniten.edu.my>.
Davide Bianchi wrote:

> What is 'foo.bar.edu.my'?

I simply didn't want to invite too many people; it is a publicly 
accessible FQDN.

> And what is the httpd.conf BEFORE the
> changes?

I was afraid, it might be too long. Now it is attached.

Uwe


Re: [users@httpd] Virtual Hosts - main site disappears with vhosts

Posted by Davide Bianchi <da...@onlyforfun.net>.
Uwe Dippel wrote:
> I administrate foo.bar.edu.my. Until now, it is one CMS. In future, we
> want to use more, so I tried vhosts.
> 
> This is what I added to hhtpd.conf:
> 
>>>     <VirtualHost *>
>>>     ServerName foo.bar.edu.my
>>>     DocumentRoot /var/www/htdocs
>>>     </VirtualHost>
>>>
> Now, 2ndfoo.bar.edu.my and anotherfoo.bar.edu.my show up as expected.
> But the main site, foo.bar.edu.my, is gone. Pointing the browser to it,
> brings me to some Google search site for a strange intsvr:

What is 'foo.bar.edu.my'? And what is the httpd.conf BEFORE the
changes?

Davide

-- 
Besides, I think Slackware sounds better than 'Microsoft,' don't you?
   -- Patrick Volkerding

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