- Betroffene Version
- WoltLab Suite 5.4
Hi,
I've got some problems with forcing https:// for incoming requests. I think this conflicts with the URL Rewriting of WoltLab. I use an apache Webserver.
This is my /etc/apache/sites-enabled file.
<IfModule mod_ssl.c>
SSLStaplingCache shmcb:/var/run/apache2/stapling_cache(128000)
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.afternight.eu
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*) http://www.%{HTTP_HOST}$1 [R=301,L]
# Redirect / https://afternight.eu
</VirtualHost>
<VirtualHost _default_:443>
DocumentRoot /var/www/html
ServerName www.afternight.eu
ServerAlias afternight.eu
Include /etc/letsencrypt/options-ssl-apache.conf
SSLUseStapling on
SSLCertificateFile /etc/letsencrypt/live/afternight.eu/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/afternight.eu/privkey.pem
</VirtualHost>
</IfModule>
Alles anzeigen
And this is my .htaccess file in /var/www/html:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
#RewriteCond %{HTTPS} off
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^support/(.*)$ support/index.php?$1 [L,QSA]
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^forum/(.*)$ forum/index.php?$1 [L,QSA]
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^calendar/(.*)$ calendar/index.php?$1 [L,QSA]
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(.*)$ index.php?$1 [L,QSA]
</IfModule>
Alles anzeigen
With the current configuration I get an error that there cannot be more than 20 redirects (different error than the one when I uncomment)
When uncommenting the commented statements it results into a Failed to open page (too many redirects). Can anyone help me solve this? I would appreciate some help a lot after trying to figure this out for quite some time...
Best regards
Mr. Smirk
PS: Please move this topic to the correct forum, if I've chosen the wrong one. This is more about apache than about WoltLab Suite, though I hoped to find some help here.