Bonsoir,
Depuis que j'ai mis mon site en ssl, les urls avec www ne fonctionnent plus
Ci dessous les fichiers de conf apache.
Le nouveau ssl :
l'ancien fichier conf sans ssl :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 <IfModule mod_ssl.c> <VirtualHost *:443> ServerAdmin xxx ServerName www.xxx.com ServerALias xxx.com DocumentRoot /var/www/html/xxx <Directory /> Options FollowSymLinks AllowOverride All </Directory> <Directory /var/www/html/xxx> Options FollowSymlinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined SSLCertificateFile /etc/letsencrypt/live/xxx.com/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/xxx.com/privkey.pem Include /etc/letsencrypt/options-ssl-apache.conf </VirtualHost> </IfModule>
Merci d'avance
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 <VirtualHost *:80> ServerAdmin xxx ServerName www.xxx.com ServerALias xxx.com DocumentRoot /var/www/html/xxx <Directory /> Options FollowSymLinks AllowOverride All </Directory> <Directory /var/www/html/xxx> Options FollowSymlinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined RewriteEngine on RewriteCond %{SERVER_NAME} =xxx.com [OR] RewriteCond %{SERVER_NAME} =www.xxx.com RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] </VirtualHost>
Franck
Partager