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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
"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 |