httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlo Florendo" <ca...@hq.astra.ph>
Subject Re: [users@httpd] virtual host does not show up correctly when Apache/SSL is enabled
Date Thu, 21 Aug 2003 00:49:01 GMT
----- Original Message -----
From: "Leif W"
Sent: Wednesday, August 20, 2003 9:17 PM
Subject: Re: [users@httpd] virtual host does not show up correctly when Apache/SSL is enabled

Thanks a lot Leif.

> One thing I don't see in your code is the NameVirtualHost directive.  Also
> noticed that one site was not a VirtualHost at all, and am not sure if that
> is what was intended,

Yes, I intended the other site not to be virtual hosted.   I simply changed the default parameters
of the httpd.conf sample file to
serve my main site.  Then I wanted to add another site so I did the obvious--added a virtual
host.

What difference does it make if:

a) I have two sites; One is virtual hosted and the other is not

and

b) I have two sites; Both are virtual hosted.

>so I assumed it was not and stuck it in a VirtualHost
> for the example.  Maybe something like the following would work?

Yes it did!  but only if I appended the port number in the IP address part of the virtual
host directive (e.g <VirtualHost
192.168.30.10:80>)

I'm still not so clear why I need to append the port number.   What does this have to do with
SSL?  (Please remember that my virtual
hosts don't work when I run apache/SSL)

>
> ----------------start snippet of httpd.conf----------------
> Listen 192.168.30.10:80
> NameVirtualHost 192.168.30.10
> <VirtualHost 192.168.30.10>
>     DocumentRoot "/var/www/html"
>     ServerName manila.astra.ph
> </VirtualHost>
>
> Listen 192.168.30.12:80
> NameVirtualHost 192.168.30.12
> <VirtualHost 192.168.30.12>
>     DocumentRoot "/var/www/tokyo/"
>     ServerName tokyo.astra.ph
> </VirtualHost>
> ----------------end snippet of httpd.conf----------------
>
> ----------------start snippet of ssl.conf----------------
> Listen 192.168.30.10:443
> <VirtualHost 192.168.10.10>
>     DocumentRoot "/var/www/tokyo/"
>     ServerName manila.astra.ph
> </VirtualHost>
>
> Listen 192.168.30.12:443
> <VirtualHost 192.168.10.12>
>     DocumentRoot "/var/www/tokyo/"
>     ServerName tokyo.astra.ph
> </VirtualHost>
> ----------------end snippet of ssl.conf----------------
>
> ----- Original Message -----
> From: "Carlo Florendo" <carlo@hq.astra.ph>
> To: <users@httpd.apache.org>
> Sent: Wednesday, August 20, 2003 4:27 AM
> Subject: [users@httpd] virtual host does not show up correctly when
> Apache/SSL is enabled
>
>
> > Hello,
> >
> > I've configured apache to listen to both http and https requests on one
> virtual host.  So I effectively have one non-virtual hosted
> > site and another that is virtual hosted.
> >
> > The virtual hosted site is configured to accept both http and https
> requests.
> >
> > Whenever I run apache with https enabled, I'm *incorrectly* redirected to
> the main page of the non-virtual host site
> > whenever I access the virtual hosted site.  However, when I restart apache
> without https enabled, I am correctly directed to the
> > virtual hosted site.
> >
> > Here are the relevant portions of my configuration files.
> >
> > ----------------start snippet of httpd.conf----------------
> >
> > Listen 192.168.30.10:80
> > Listen 192.168.30.12:80
> >
> > DocumentRoot "/var/www/html"
> > ServerName manila.astra.ph
> >
> > <VirtualHost 192.168.30.12>
> >     DocumentRoot "/var/www/tokyo/"
> >     ServerName tokyo.astra.ph
> > </VirtualHost>
> >
> > ----------------end snippet of httpd.conf----------------
> >
> > Both manila.astra.ph and tokyo.astra.ph are valid DNS names and are
> respectively mapped to 192.168.30.10 and 192.168.30.12
> >
> > ----------------start snippet of ssl.conf----------------
> > Listen 192.168.30.10:443
> > Listen 192.168.30.12:443
> >
> > <VirtualHost 192.168.10.12:443>
> >
> > DocumentRoot "/var/www/tokyo/"
> > ServerName tokyo.astra.ph
> > ServerAdmin root@localhost
> > ErrorLog logs/error_log
> > TransferLog logs/access_log
> >
> >
> > ----------------end snippet of ssl.conf----------------
> >
> > Any workaround on the matter?
> >
> > Thanks!
> >
> > Best Regards,
> > Carlo
> > ------
> > Carlo Florendo
> > Astra Philippines Inc.
> > URL: http://www.hq.astra.ph



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