I have a problem on my web server when trying to enable Lets Encrypt for one website.
First of all I’m running Ubuntu Server 16.04 with Apache 2.4 and the other websites on the server work very well.
When I try to load a particular website the following message appears:
The page isn’t redirecting properly
Does anyone see something wrong in this configuration ?
I have nothing in apache error log except [Sat Jul 08 08:10:04.938672 2017] [ssl:warn] [pid 16376] AH01909: domain.fr:443:0 server certificate does NOT include an ID which matches the server name
I don’t see anything wrong in those files. However, I notice you have AllowOverride All in both. Do you have a .htaccess file in /home/website? If so, the problem may be there instead.
Are you using a reverse proxy or CDN with this domain? If so, it might be connecting to your webserver over HTTP, which would cause the :80 configuration to kick in again.
I’m more of an nginx guy, so I’m just going by what’s familiar, but are you sure those redirect rules are set up properly? I seem to recall seeing that typically written differently.
I think you missed my previous comment so I will try again.
A) You have made an assumption that Apache is the only thing that can do redirects.
B) You have not provided a domain name so people can’t do their own testing
C) You therefore should do your own testing. Use chrome developer tools or something like this http://www.redirect-checker.org/index.php
If you would like people to provide assistance then you should do your bit (share information) otherwise google and stackexchange are your friends if you can’t share your domain
A) Can you explain to me what I’m missing ?
B) www.duboisveysseyre.fr
C) Rediret-cheker.org output: https://www.duboisveysseyre.fr 301 Moved Permanently http://www.duboisveysseyre.fr/index.php? 302 Found https://www.duboisveysseyre.fr/index.php 301 Moved Permanently http://www.duboisveysseyre.fr/index.php? 302 Found https://www.duboisveysseyre.fr/index.php 301 Moved Permanently http://www.duboisveysseyre.fr/index.php? 302 Found https://www.duboisveysseyre.fr/index.php 301 Moved Permanently http://www.duboisveysseyre.fr/index.php? 302 Found https://www.duboisveysseyre.fr/index.php 301 Moved Permanently http://www.duboisveysseyre.fr/index.php? 302 Found https://www.duboisveysseyre.fr/index.php 301 Moved Permanently http://www.duboisveysseyre.fr/index.php? 302 Found https://www.duboisveysseyre.fr/index.php 301 Moved Permanently http://www.duboisveysseyre.fr/index.php? 302 Found https://www.duboisveysseyre.fr/index.php 301 Moved Permanently http://www.duboisveysseyre.fr/index.php? 302 Found https://www.duboisveysseyre.fr/index.php 301 Moved Permanently http://www.duboisveysseyre.fr/index.php? 302 Found https://www.duboisveysseyre.fr/index.php 301 Moved Permanently http://www.duboisveysseyre.fr/index.php? 302 Found Problems found:
Too many redirects. Please try to reduce your number of redirects for https://www.duboisveysseyre.fr. Actually you use 19 Redirects. Ideally you should not use more than 3 Redirects in a redirect chain. More than 3 redirections will produce unnecessary load on your server and reduces speed, which ends up in bad user experience.
You use 301 and 302 redirect at the same time. This might be confusing for search engine. Generally, please do not use 301 and 302 redirects at the same time.
You use a 302 redirect. This means, that the actually content is temporary not reachable and will come back soon. To use a 302 redirection for generally moved pages is a bad idea. Search engine bot might not follow it or handle it as temporary. For SEO this is also a bad idea, because no link juice will be transferred to the linked page.`
Interesting, you are on the Ubuntu Server. On my server both of these directives goes on the virtual host file and not inside the if module configuration.
<IfModule mod_ssl.c>
... </IfModule>
The </IfModule> is usually to redirect the includes pointing to the virtual host file.
Do you have an virtual host file? Something with the name httpd-vhosts.conf ?
We are at different operating system but Apache directory tree is (I think) standard to everyone.
You should put your Apache Configuration Directory tree here because something is not adding up.
All of my vhosts files are in /etc/apache/sites-available/
I have a mydomain.conf that correspond to the http vhost containing redirection rules to the https domain
Certbot creates a mydomain-le.conf that correspond to the https vhost
All the sites on this server have the same configuration and structures and work fine.
Your HTTP site is redirecting to HTTPS. Your HTTPS site is then redirecting back to HTTP and adding index.php? to the end of the URL. I don’t see anything in domain-le-ssl.conf that looks like it would do that, so I’m guessing the problem is elsewhere.
Are you sure you don’t have a .htaccess file? (you know it’s hidden by default, right? type ls -a to see it)
If that’s not it, it might be something in the PHP code itself that’s doing the redirect. Is it your own custom code or something you downloaded? EDIT: based on your favicon I’m guessing you’re using webtrees - if so then this information may be helpful.