apache2 virtual host problem

This is a discussion on apache2 virtual host problem within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi Group, A while ago I did a small site to display pictures from our family reunion in England (mostly ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-17-2003
Alan S. Daniel
 
Posts: n/a
Default apache2 virtual host problem

Hi Group,
A while ago I did a small site to display pictures from our family reunion
in England (mostly to see some pictures since I didn't get to go). Anyway,
Speakeasy, my ISP in addition to providing DNS pointing to my small Domain
allows me to add sub-domains to my DNS record, so I added
brighton02.pghdaniel.net to both Speakeasy's DNS and my own BIND server (I'm
behind a half-duplex DSL router).

I then did some research in my Apache books on virtual hosts, and configured
my httpd.conf file as follows:

NameVirtualHost 192.168.0.2

NameVirtualHost 66.93.172.214

#

# pghdaniel.net

#

<VirtualHost _default_:*>

DocumentRoot /var/www/html

ServerName pghdaniel.net

</VirtualHost>

<VirtualHost 66.93.172.214:80 192.168.0.2:80>

DocumentRoot /var/www/html

ServerName www.pghdaniel.net

</VirtualHost>

#

# Brighton Site

#

<VirtualHost 66.93.172.214:80 192.168.0.2:80>

DocumentRoot /www/brighton02

ServerAdmin alan@pghdaniel.net

ServerName brighton2002.pghdaniel.net

CustomLog /var/log/httpd/brighton2002-access_log combined

ErrorLog /var/log/httpd/brighton2002-error_log

</VirtualHost>

I recently upgraded my Mandrake Distro from 9.0 to 9.1 which includes the
apache2 server. Now when I type brighton2002.pghdaniel.net, I am sent to
Mandrakes's default index.shtml file in /var/www instead of the index.html
file in /www/brighton02. When I ls -l /etc/httpd/2.0, the conf directory is
a symlink to /etc/httpd/conf (the same conf files for the 1.3.x server). Yet
when I type pghdaniel.net/brighton02 ( an alias in the aliases section), I
get my site

Are there differences in the config files between the two servers regarding
virtual hosts that I'm missing? I'm using the advx release of apache which
comes with two scripts (advxrun1.3 and advxrun2.0) to switch between server
releases.

When I type:

# advxrun1.3

and switch back to apache 1.3.x, brighton2002.pghdaniel.net appears as it
should. I also tried using a dialup connection in case it was a problem with
my dns server, but I still get /var/www/html/index.shtml when I run the
2.0.x server



Thanks,

Alan S Daniel


  #2 (permalink)  
Old 08-17-2003
Davide Bianchi
 
Posts: n/a
Default Re: apache2 virtual host problem

In alt.apache.configuration Alan S. Daniel <alan@pghdaniel.net> wrote:
> NameVirtualHost 192.168.0.2
> NameVirtualHost 66.93.172.214


Only one "NameVirtualHost" is necessary, since your apache respond
on all the IPs, you can just use NameVirtualHost *

> I recently upgraded my Mandrake Distro from 9.0 to 9.1 which includes the
> apache2 server.


Check if your Apache is still the same or it changed also the httpd.conf.

Davide
  #3 (permalink)  
Old 08-19-2003
Alan S. Daniel
 
Posts: n/a
Default Re: apache2 virtual host problem


"Davide Bianchi" <davideyeahsure@onlyforfun.net> wrote in message
news:bhn5ra$15q4r$2@ID-18487.news.uni-berlin.de...
> In alt.apache.configuration Alan S. Daniel <alan@pghdaniel.net> wrote:
> > NameVirtualHost 192.168.0.2
> > NameVirtualHost 66.93.172.214

>
> Only one "NameVirtualHost" is necessary, since your apache respond
> on all the IPs, you can just use NameVirtualHost *


I tried that, but I'm still getting the same results.

>
> > I recently upgraded my Mandrake Distro from 9.0 to 9.1 which includes

the
> > apache2 server.

>
> Check if your Apache is still the same or it changed also the httpd.conf.
>

I'm pouring through the Apache docs included with my distro. so far, no
luck. I tried moving the brighton2002.pghdaniel.net VirtualHost directive to
the top of my VirtualHosts part of my .conf file, so that apache will read
it first, but I'm still getting the /var/www/html/index.shtml page.
> Davide



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:47 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0