 |
Linode.com Forum Linode Community Forums
|
| Author |
Message |
pmmenneg
Joined: 09 Mar 2004
Posts: 41
|
| Posted: Mon Mar 28, 2005 2:08 pm Post subject: SSL + Apache on VirtualHost |
|
|
Hi there.
I have Apache 1.x running with a number of VirtualHosts. Recently, the need has arisen for me to offer secure communications on one of my VirtualHosts (on the whole website once the user has authenticated, not just a /members/ area)
So, in my Apache config, I now have two virtualhost sections for the same website, bith identical except that one has the SSL related directives in it, and the Virtualhost directive looks like
Code: <VirtualHost *>
ServerName mydomain.com
...
</VirtualHost>
For the first one, and:
Code: <VirtualHost *:443>
ServerName mydomain.com
...
</VirtualHost>
for the second one, with all the custom error pages, etc identical in both. This seems cumbersome, but I can't find an answer anwhere as to whether I can combin the two into one single directive that can handle both port 80 and 443 traffic.
Am I doing this correctly? It seems like alot of duplication in each respective section with the loggin, custom error pages, aliases, all existing in both locations.
Thanks for any input! |
|
| Back to top |
|
pclissold
Joined: 24 Oct 2003
Posts: 471
Location: Netherlands
|
| Posted: Tue Mar 29, 2005 2:16 am Post subject: |
|
|
| I think what you have done is how you're meant to do it. One file tree accessed with two different behaviours, depending on the connection port, requires two virtual hosts. |
|
| Back to top |
|
pmmenneg
Joined: 09 Mar 2004
Posts: 41
|
| Posted: Tue Mar 29, 2005 11:09 am Post subject: |
|
|
pclissold wrote: I think what you have done is how you're meant to do it. One file tree accessed with two different behaviours, depending on the connection port, requires two virtual hosts.
Great, thank you! |
|
| Back to top |
|
| |
|