Problème de RewriteEngine en apache 2
bonjour,
j'ai le problème suivant, sur lequel je butte depuis
un certain moment!!
je voudrais, que chaque fois qu'on accède à ma page
sur le port 443, apache transforme la requête de http
en https.
Pour cela, j'ai activé mod_rewrite, et je vous donne
mon fichier de config à la fin du mail.
mais quand je tape http://mon_serveur:443/, il me dit
"Impossible d'afficher la page", et donc la
redirection n'a pas lieu..
Help!!
----------------
fichier de conf
----------------
Listen 443
#NameVirtualHost *
<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
#AllowCONNECT 443
SSLEngine on
SSLProtocol -all +SSLv2
SSLCertificateFile /root/cles/fichier.crt
SSLCertificateKeyFile /root/cles/fichier.key
#SSLProxyEngine on
# REWRITE
RewriteEngine on
RewriteLog "/var/log/apache2/rewrite_log"
RewriteLogLevel 250
RewriteRule ^/(.*):443$
https://%{SERVER_NAME}/$1 [R,L]
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
MultiViews
AllowOverride All
Order allow,deny
allow from all
# This directive allows us to have
apache2's default start page
# in /apache2-default/, but still have
/ go to the right place
RedirectMatch ^/$ /apache2-default/
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews
+SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info,
notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
#SSLEngine on
#SSLCertificateFile /root/cles/fichier.crt
#SSLCertificateKeyFile /root/cles/fichier.key
#SSLProxyEngine on
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
#AllowCONNECT 80
# REWRITE
RewriteEngine on
RewriteLog "/var/log/apache2/rewrite_log"
RewriteLogLevel 250
RewriteRule ^/(.*):443$
https://%{SERVER_NAME}/$1 [R,L]
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have
apache2's default start page
# in /apache2-default/, but still have
/ go to the right place
#RedirectMatch ^/$ /apache2-default/
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info,
notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
SSLEngine off
</VirtualHost>
----------------------------------------------------
__________________________________________________________________
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/
Reply to: