Bonjour,
Après avoir épluché je ne sais combien de forums, je suis un peu bloqué :
J'ai une adresse une serveur sur lequel j'arrive par l'url
http://xxx.freeboxos.fr ou
https://xxx.freeboxos.fr
Les 2 fonctionnent parfaitement et arrivent sur un blog WordPress.
J'ai ajouté un cloud Nextcloud sur lequel je veux arriver par
http://xxx.freeboxos.fr:8080 ou
https://xxx.freeboxos.fr:8443
L'accès en https fonctionne.
L'accès en http me renvoie une erreur SSL_ERROR_RX_RECORD_TOO_LONG et j'ai dans la barre d'adresse :
https://xxx.freeboxos.fr:8080, comme s'il y avait un problème de redirection de port
Voila le VirtualHost
Listen *:8080
<VirtualHost *:8080>
DocumentRoot /var/www/html/nextcloud/
ServerName xxx.freeboxos.fr
Redirect permanent / https://xxx.freeboxos.fr:8443
TransferLog /var/log/apache2/nextcloud_access.log
ErrorLog /var/log/apache2/nextcloud_error.log
</VirtualHost>
Listen *:8443
<VirtualHost *:8443>
DocumentRoot /var/www/html/nextcloud/
ServerName xxx.freeboxos.fr
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
</IfModule>
<Directory "/var/www/html/nextcloud">
Options -Indexes +MultiViews +FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
TransferLog /var/log/apache2/nextcloud_access.log
ErrorLog /var/log/apache2/nextcloud_error.log
SSLCertificateFile /etc/letsencrypt/live/xxx.freeboxos.fr/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/xxx.freeboxos.fr/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
J'ai aussi ajouté un forum phpBB sur lequel je veux arriver par
http://xxx.freeboxos.fr:8081 ou
https://xxx.freeboxos.fr:8444
J'ai exactement le même pb : OK en https, mais pas OK en http
Listen *:8081
<VirtualHost *:8081>
DocumentRoot /var/www/html/phpBB3/
ServerName xxx.freeboxos.fr
Redirect permanent / https://xxx.freeboxos.fr:8444
TransferLog /var/log/apache2/phpBB_access.log
ErrorLog /var/log/apache2/phpBB_error.log
</VirtualHost>
Listen *:8444
<IfModule mod_ssl.c>
<VirtualHost *:8444>
DocumentRoot /var/www/html/phpBB3/
ServerName xxx.freeboxos.fr
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
</IfModule>
<Directory "/var/www/html/phpBB3">
Options -Indexes +MultiViews +FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
TransferLog /var/log/apache2/phpBB_access.log
ErrorLog /var/log/apache2/phpBB_error.log
SSLCertificateFile /etc/letsencrypt/live/xxx.freeboxos.fr/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/xxx.freeboxos.fr/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
Voila aussi pour info le VirtualHost pour les ports par défaut (accès http et redirection https OK)
<VirtualHost *:80>
DocumentRoot /var/www/wordpress/
ServerName xxx.freeboxos.fr
Redirect permanent / https://xxx.freeboxos.fr:443
</VirtualHost>
<VirtualHost *:443>
DocumentRoot /var/www/wordpress/
ServerName xxx.freeboxos.fr
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; include subDomains; preload"
<Directory /var/www/wordpress>
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/apache2/error.wordpress.log
CustomLog /var/log/apache2/access.wordpress.log combined
SSLCertificateFile /etc/letsencrypt/live/xxx.freeboxos.fr/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/xxx.freeboxos.fr/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
Je sèche... et vu que c'est de l'expérimental, je voudrais aussi ajouter un wiki sur le 8082 / 8445 🙂