PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.info.servers.unix > Apache 2,ssl & virtual host
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.info.servers.unix Web servers for UNIX platforms.

Apache 2,ssl & virtual host

Réponse
 
LinkBack Outils de la discussion
Vieux 06/04/2005, 00h54   #1
Erri
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Apache 2,ssl & virtual host

Hi!
Anyone does know or have an example of virtual host and ssl ?
Now i have several domains working on apache 2.0.53 and i need one of this
works with ssl. I'm making test, but it doesn't works.
In httpd.conf i have following lines:
<IfModule mod_ssl.c>
Include conf/ssl.conf
</IfModule>
NameVirtualHost 172.168.0.3:80
NameVirtualHost 172.168.0.3:443
<VirtualHost 172.168.0.3:80>
ServerAdmin root@dominio1.com
DocumentRoot /web/htdocs
ServerName dominio1.com
ServerAlias www.dominio1.com
</VirtualHost>
<VirtualHost 172.168.0.3:80>
ServerAdmin root@dominio2.com
DocumentRoot /web2/htdocs
ServerName dominio2.com
ServerAlias www.dominio2.com
</VirtualHost>

And in ssl.conf i have virtual host with ssl:

SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
Listen 443
SSLPassPhraseDialog builtin
SSLSessionCache dbm:/usr/local/apache2/logs/ssl_scache
SSLSessionCacheTimeout 300
SSLMutex file:/usr/local/apache2/logs/ssl_mutex
<IfDefine SSL>
<VirtualHost 172.168.0.3:443>
ServerAdmin root@dominio3.com
DocumentRoot /web3/htdocs/
ServerName www.dominio3.com
SSLEngine on
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSL v2:+EXP:+eNULL
SSLCertificateFile /usr/local/apache2/conf/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/apache2/conf/ssl.key/server.key
<Files ~ "\.(cgi|shtml|phtml|php3?|php)$">
SSLOptions +StdEnvVars
</Files>
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog /usr/local/apache2/logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
</IfDefine>

What's wrong?

Thanks.


  Réponse avec citation
Vieux 06/04/2005, 18h08   #2
Jorey Bump
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache 2,ssl & virtual host

"Erri" <erricharl@hotmail.com> wrote in
news:cGE4e.672554$q7.835820@telenews.teleline.es:

> Now i have several domains working on apache 2.0.53 and i need one of
> this works with ssl. I'm making test, but it doesn't works.


"it doesn't works" is a bit vague.

How did you start apache?
After starting apache, is it listening on port 443?
If it's listening on port 443, did you create certificates?
If you created certificates, what do the logs say when you try to connect?

Apache logging is excellent. Always look there first when you have a
problem.


  Réponse avec citation
Vieux 06/04/2005, 19h37   #3
Erri
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache 2,ssl & virtual host

Jorey Bump escribió:
> "Erri" <erricharl@hotmail.com> wrote in
> news:cGE4e.672554$q7.835820@telenews.teleline.es:
>
>>Now i have several domains working on apache 2.0.53 and i need one of
>>this works with ssl. I'm making test, but it doesn't works.

>
> "it doesn't works" is a bit vague.
>
> How did you start apache?
> After starting apache, is it listening on port 443?
> If it's listening on port 443, did you create certificates?
> If you created certificates, what do the logs say when you try to connect?
>
> Apache logging is excellent. Always look there first when you have a
> problem.
>
>

Sorry you have reason. Now it works for me, but i have a little problem.
If i type http://dominio3.com (domain working with ssl 443 port) i see
my default virtual host(http://dominio1.com). If i type
https://dominio3.com all go fine.
How do i can all traffic to domain3.com go to 443 port ?

Thanks.
  Réponse avec citation
Vieux 06/04/2005, 23h14   #4
Jorey Bump
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache 2,ssl & virtual host

Erri <jperezme@mi.madritel.es> wrote in
news:C7V4e.697907$q7.856997@telenews.teleline.es:

> Sorry you have reason. Now it works for me, but i have a little
> problem. If i type http://dominio3.com (domain working with ssl 443
> port) i see my default virtual host(http://dominio1.com). If i type
> https://dominio3.com all go fine.
> How do i can all traffic to domain3.com go to 443 port ?


<VirtualHost 172.168.0.3:80>
ServerAdmin root@dominio3.com
ServerName dominio3.com
ServerAlias www.dominio3.com
Redirect / https://www.dominio3.com/
</VirtualHost>

It's a completely different site, so you can point it to any DocumentRoot
you want. It can even share the same DocumentRoot as the SSL dominio3.com
virtual host, as long as you redirect sensitive locations.

For example, if both hosts for dominio3.com share a DocumentRoot, but you
have a directory that should always be accessed via SSL, you could do this:

<VirtualHost 172.168.0.3:80>
ServerAdmin root@dominio3.com
DocumentRoot /web3/htdocs
ServerName dominio3.com
ServerAlias www.dominio3.com
Redirect /secure https://www.dominio3.com/secure
</VirtualHost>

  Réponse avec citation
Vieux 07/04/2005, 00h36   #5
Erri
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache 2,ssl & virtual host

Ok Jorey.
It works perfectly now.
Thanks a lot.



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h47.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11912 seconds with 13 queries