You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by KURT PETERS <pe...@msn.com> on 2009/02/18 07:35:16 UTC
[users@httpd] RE: port 80 + 8080 + SSL (443)
Thanks for your help. The *:80 method seems to work. Just have 2 follow-up questions:
1) Did I need to put the Listen 443 AFTER the </VirtualHost> for the 80 and 8080? In other words, does apache2 do the parsing of virtual hosts and "listens" in order?
2) I use godaddy's forwarding feature for my domain name <whatever.com>
does anyone know why I have to use the actual IP address when I want to get my web server to respond to anything other than the port 80 at <whatever.com>? For instance, if I type in <http://www.myserver.com:8080> it does not work, but if I use <http://172.20.30.40:8080> it does!
I'm wondering if this is a godaddy problem or my Apache2 set up. I put my machine in a DMZ for a short period of time to see if it was my router, and that doesn't seem to be the case: it doesn't work with my machine in the DMZ either.
Regards,
Kurt
--Forwarded Message Attachment--
From: karel@e-tunity.com
To: users@httpd.apache.org
Date: Mon, 16 Feb 2009 16:41:59 +0100
Subject: Re: [users@httpd] port 80 + 8080 + SSL (443)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Kurt,
On Feb 16, 2009, at 4:22 PM, KURT PETERS wrote:
> <VirtualHost 172.20.30.40:80 172.20.30.40:8080 192.168.1.40:80
> 192.168.1.40:8080>
> ServerName www.example.com
> ServerAlias LOCALNAME
> DocumentRoot /var/www
> </VirtualHost>
>
> NameVirtualHost 172.20.30.40:443
> NameVirtualHost 192.168.1.40:443
>
> <VirtualHost 172.20.30.40:443 192.168.1.40:443>
> ServerName www.example.com
> DocumentRoot /var/secwww
> </VirtualHost>
>
> Is there an "easier" way to do this?
Since you aren't serving different content based on the hostname that
a browser is requesting, I think that you don't need NameVirtualHost.
You might try simplifying by:
Listen 80
Listen 8080
<VirtualHost *:80 *:8080>
...
</VirtualHost>
Listen 443
<VirtualHost *:443>
...
</VirtualHost>
This is all off the top of my head, you'd need to check directives in
the docs. But answering your question: this may be an easier way, but
your method is certainly valid as well and isn't "overdoing it".
- --
Best regards / met vriendelijke groet, Karel Kubat
Mob +31 6 2956 4861
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
iEYEARECAAYFAkmZiUcACgkQ23FrzRzybNXKrgCdHWT08hYfX7x4rtjDMGH5GsCD
KEwAniB7GWZDcDoTiTm22d/03tApP+ml
=ahBk
-----END PGP SIGNATURE-----
--Forwarded Message Attachment--
Date: Mon, 16 Feb 2009 13:27:59 -0500
From: covener@gmail.com
To: users@httpd.apache.org
Subject: Re: [users@httpd] port 80 + 8080 + SSL (443)
> <VirtualHost 172.20.30.40:443 192.168.1.40:443>
> ServerName www.example.com
> DocumentRoot /var/secwww
> </VirtualHost>
in addition to Karel' response, you do need mod_ssl directives to
actually service SSL on this port.
--
Eric Covener
covener@gmail.com
Re: [users@httpd] RE: port 80 + 8080 + SSL (443)
Posted by Krist van Besien <kr...@gmail.com>.
On Wed, Feb 18, 2009 at 7:35 AM, KURT PETERS <pe...@msn.com> wrote:
> Thanks for your help. The *:80 method seems to work. Just have 2 follow-up
> questions:
>
> 1) Did I need to put the Listen 443 AFTER the </VirtualHost> for the 80 and
> 8080? In other words, does apache2 do the parsing of virtual hosts and
> "listens" in order?
No. You can safely put all the "Listens" up front.
> 2) I use godaddy's forwarding feature for my domain name <whatever.com>
> does anyone know why I have to use the actual IP address when I want to get
> my web server to respond to anything other than the port 80 at
> <whatever.com>? For instance, if I type in <http://www.myserver.com:8080>
> it does not work, but if I use <http://172.20.30.40:8080> it does!
> I'm wondering if this is a godaddy problem or my Apache2 set up.
It's a "GoDaddy" problem. The way their forwarding works is that they
set up a virtualhost with your domain name on one of their servers,
and forward all requests. But they only do this for port 80.
You need to make whatever.com point directly to your IP, in stead of
using a forwarding service. If your IP is dynamic you could use a
service like zoneedit.com. I've been using them for ages now for my
homeserver.
Krist
--
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?
---------------------------------------------------------------------
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