NYCPHP Meetup

NYPHP.org

[nycphp-talk] Apache 2.0/Virtual Host with SSL

Tim Gales tgales at tgaconnect.com
Mon Oct 6 18:39:06 EDT 2003


Jeff,

I was playing around with my apache (2.043) server on
windows -- Starting it with different command switches
Apache -t -D DUMP_VHOSTS   showed me my virtual hosts 

Have you tried setting your LogLevel to info or debug 
To get more info in the error log?

Just some thoughts..

T. Gales & Associates
Helping People Connect with Technology
http://www.tgaconnect.com

-----Original Message-----
From: talk-bounces at lists.nyphp.org
[mailto:talk-bounces at lists.nyphp.org] On Behalf Of Jeff
Siegel
Sent: Monday, October 06, 2003 11:36 AM
To: 'NYPHP Talk'
Subject: RE: [nycphp-talk] Apache 2.0/Virtual Host with SSL

I had tried adding in a virtual host with a specific port,
namely, 443,
but then realized there's more going on here that I realized
and the
docs aren't as clear as one might hope.

Jeff


-----Original Message-----
From: talk-bounces at lists.nyphp.org
[mailto:talk-bounces at lists.nyphp.org]
On Behalf Of Hans Zaunere
Sent: Monday, October 06, 2003 8:56 AM
To: NYPHP Talk
Subject: Re: [nycphp-talk] Apache 2.0/Virtual Host with SSL




Jeff Siegel wrote:

> Wondering how to handle the following problem. 
> 
> I installed Apache 2.0 using RH 9 (it comes bundled with
PHP 4.2.2).
> After setting up virtual hosts using that beautifully
written article
I
> found at http://phundamentals.nyphp.org, I then tested
some of my code
> which redirects a user to an HTTPS connection. I keep
getting an Err
> 404. Thinking it might be the code I created two simple
test pages:
the
> first page has a link to the second page. Here's the link:
<a
> href="https://unap/test2.php">click me</a>. Now, "unap" is
a virtual
> host on the server and all other links work correctly on
the server
but
> not this one. *However*, if I change the link to a fixed
IP address,
> i.e.,  <a
href="https://192.168.1.112/unap/test2.php">click
me</a>...it
> works fine. It seems, then, there is an Apache
configuration that I'm
> missing. Hopefully someone can point me in the right
direction.

It looks like a configuration issue with ssl/apache.
Basically, an SSL
server can be seperate from a non-SSL server.  It's generaly
just
another virtual host (based on port), with it's own document
root,
permissions, directives, etc.

I'm not sure of the default httpd.conf that RH 9 uses, but I
have a
feeling this is the case.  You have to make sure that
either:

1) the two vhosts overlap, considering that name based and
"SSL based"
vhosts can be independant, or
2) that you're not letting Apache fallback to a default
vhost (ie, the
main server).  Also keep in mind the ordering of vhost
directives, and
the document roots of each - if a request doesn't match a
named host,
AND the fact that it's either SSL or not, the request will
fall back to
the main server.

Hope that doesn't confuse too much :)

Hans

-------------------------------
Try the new NYPHP Forums Today!
http://forums.nyphp.org



_______________________________________________
talk mailing list
talk at lists.nyphp.org
http://lists.nyphp.org/mailman/listinfo/talk

_______________________________________________
talk mailing list
talk at lists.nyphp.org
http://lists.nyphp.org/mailman/listinfo/talk




More information about the talk mailing list