[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
re: [obsdfr-misc] httpd.conf, virtualhosts et SSL
Bonjour,
Je m'etait en sont temps heurtà à ce probleme.
modifie ton httpd.conf suit :
au debut :
# La partie general de ton serveur, qui configure ton serveur sans sous domaine
# Le non de ton domain
ServerName matthieuberjon.com
#Port 80
# on ecoute le port 80
Listen 80
Si on fait du SSL, on ecoute le port 443
Listen 443
# L'emplacement des fichiers du domaine
DocumentRoot /var/www/htdocs/matthieuberjon.com
ServerAdmin matthieu POINT berjon AT wavefield.fr
# On definie la partie SSL
DocumentRoot "/var/www/htdocs/test.matthieuberjon.com"
ServerName test.matthieuberjon.com
DirectoryIndex index.php index.htm index.html index.cgi
AllowOverride AuthConfig
Order deny,allow
Deny from all
ErrorDocument 403 /403.html
allow from all
Options +Indexes
SSLEngine on
SSLCertificateFile /etc/ssl/matthieuberjon.com.crt
SSLCertificateKeyFile /etc/ssl/private/matthieuberjon.com.key
# Les autres sous domaine :
NameVirtualHost *
### priv.matthieuberjon.com ###
DocumentRoot /var/www/htdocs/priv.matthieuberjon.com
ServerName priv.matthieuberjon.com
DirectoryIndex index.html index.htm index.php
ErrorLog logs/error_log
CustomLog logs/access_log common
allow from all
Options +Indexes
si tu en veux un autres
### new.matthieuberjon.com ###
DocumentRoot /var/www/htdocs/new.matthieuberjon.com
ServerName new.matthieuberjon.com
DirectoryIndex index.html index.htm index.php
Chaques VHOST doivent etre entre les directives et
Tu ne peux avoir qu'un seul VHOST en SSL, du moins avec apache 1.3
Verifie que tu a un LoadModule ssl_module dans la partie IfModule
Ensuite, si tu a bien generer tes cle SSL, dans rc.conf, tu demarre apache avec -DSSL.
tu peux aussi faire apachectl stop, apachectl startssl
bon courrage
Ghislain.
============================================================
> Message du 08/03/10 22:57
> De : "Matthieu Berjon"
> A : misc AT openbsd-france POINT org
> Copie à :
> Objet : [obsdfr-misc] httpd.conf, virtualhosts et SSL
>
>
> Bonsoir à tous,
>
> Cherchant à mettre en place mon site internet sur mon petit serveur avec OpenBSD 4.6, je me heurte à un problÃme que je n'arrive pas à rÃsoudre. Il s'agit pour moi de mettre en place un sous domaine avec SSL. Malheureusement je n'arrive pas à avoir un fichier httpd.conf au petits oignons puisque j'ai jusqu'ici Ãchouà dans ma tÃche.
>
> Pour pouvoir faire des virtuals hosts en 80, je me suis fortement inspirà du tutorial fourni sur http://www.openbsd-edu.net/index.php/Apache
>
> Par contre, ayant suivi le suite pour rÃaliser un virtualhost avec SSL, je n'y arrive pas.
>
> Voici les parties que j'ai modifiÃes de mon fichier httpd.conf :
>
> NameVirtualHost *:80
> #matthieuberjon main domain
>
> ServerAdmin matthieu POINT berjon AT wavefield.fr
> DocumentRoot /var/www/htdocs/matthieuberjon.com
> ServerName matthieuberjon.com
> ErrorLog logs/error_log
> CustomLog logs/access_log common
>
>
>
> ServerAdmin matthieu POINT berjon AT wavefield.fr
> DocumentRoot /var/www/htdocs/priv.matthieuberjon.com
> ServerName priv.matthieuberjon.com
> ErrorLog logs/error_log
> CustomLog logs/access_log common
>
>
> NameVirtualHost *:443
>
> ServerAdmin moi AT monemail POINT tld
> DocumentRoot /var/www/htdocs/test.matthieuberjon.com
> ServerName test.matthieuberjon.com
> ErrorLog logs/error_log
> CustomLog logs/access_log common
> # SSLCertificateFile /etc/ssl/matthieuberjon.com.crt
> # SSLCertificateKeyFile /etc/ssl/private/matthieuberjon.com.key
>
>
>
> Je ne pense pas que cela puisse suffir pour se faire une idÃe. Du coup j'ai mis sur pastebin le fichier de configuration entier : http://pastebin.com/Bvm9McV0
>
> Je ne sais pas trÃs bien oà je fais n'importe quoi. J'ai essayà de bidouillà en faisant tout un tas d'essais mais je n'arrive jamais au bon rÃsultat qui est d'avoir un certificat autosignà sur un sous domaine en https.
>
> En vous remerciant d'avance pour votre aide,
> Je vous souhaite à tous une excellente soirÃe/nuit,
>
> Matthieu
>
>
> ________________________________
> French OpenBSD mailing list
> misc AT openbsd-france POINT org
> http://www.openbsd-france.org/communaute.php
>
>
>