Certificate don't recognize

Hello , i’ve installed a Let’s Encrypt certificate with the CertBot on my website hebergpower.fr but Chrome say to me that the certificate is not recognize .

Do you know what it’s the problem :confused: ?

please give us your domain name so we can help you

My domain is http://hebergpower.fr :slight_smile:

your https (port 443) is redirecting to the non https (port 80) you must redirect http > https and not the other way around

https://hebergpower.fr/


302 Found

Status: 302 Found
Code: 302
Date: Wed, 11 Jan 2017 16:20:48 GMT
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.3.10-1ubuntu3.25
Set-Cookie: WHMCS4N5AXDUIx2OY=hila48qddb3hmau6ul8jsq3oe5; path=/; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location: http://hebergpower.fr/index.php
Vary: Accept-Encoding
Content-Length: 0
Connection: close
Content-Type: text/html; charset=utf-8

http://hebergpower.fr/index.php


200 OK

Status: 200 OK
Code: 200
Date: Wed, 11 Jan 2017 16:20:49 GMT
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.3.10-1ubuntu3.25
Set-Cookie: WHMCS4N5AXDUIx2OY=p02batgsnrt1gvddr1sqrdv0v3; path=/; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding
Connection: close
Content-Type: text/html; charset=utf-8

Hmm, well I see, do you know how can i change that :confused: ?

It could be in one of several places.

first I’d check your .htaccess file (if it exists) in the main folder of your site and see if that has a redirect in it.

Secondly I’d check your apache configs (/etc/apache2/ ) for any redirects.

If you are unsure about either, paste them for us to look at (I’d suggest pastebin.com )

Well, I force to Https but now, my website is off :confused:

I try to desactive the HTTPS and now it’s on, i think i’ve a bug with the redirect

If you could paste your redirects, we may be able to help.

Here it is :slight_smile:

<VirtualHost *:80>
ServerAdmin webmaster@localhost

DocumentRoot /var/www
<Directory />
	Options FollowSymLinks
	AllowOverride None
</Directory>
<Directory /var/www/>
	Options Indexes FollowSymLinks MultiViews
	AllowOverride None
	Order allow,deny
	allow from all
</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 ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

RewriteEngine on
RewriteCond %{SERVER_NAME} =hebergpower.fr
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [L,QSA,R=permanent]

Do you have any other redirects ?

could you just comment out the three lines …

RewriteEngine on
RewriteCond %{SERVER_NAME} =hebergpower.fr
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [L,QSA,R=permanent]

by placing a # at the beginning of the line, and reloading apache ?

The website works but with http only

Thanks - I just wanted to do some checks now to see if there were any redirects elsewhere … testing …

There are some other redirects in place still.

can you check in your other apache configs for a redirect

grep -Ri "redirect|rewrite" /etc/apache2/*

and also check the .htaccess file in your domain root ?

I have this in etc/apache2

/etc/apache2/sites-available/default:#RewriteEngine on
/etc/apache2/sites-available/default:#RewriteCond %{SERVER_NAME} =hebergpower.fr
/etc/apache2/sites-available/default:#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [L,QSA,R=permanent]
/etc/apache2/sites-enabled/000-default:#RewriteEngine on
/etc/apache2/sites-enabled/000-default:#RewriteCond %{SERVER_NAME} =hebergpower.fr
/etc/apache2/sites-enabled/000-default:#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [L,QSA,R=permanent]
/etc/apache2/sites-enabled/000-default~:RewriteEngine on
/etc/apache2/sites-enabled/000-default~:RewriteCond %{SERVER_NAME} =hebergpower.fr

Those should be OK. Nothing else in a .htaccess file ?

What about your web page software ? does that have any “configuration” page that sets it up to (currently) go to http rather than https ?

I didn’t see the. Htaccess I think I don’t have one and my software is set to https by default :confused:

.htaccess is a hidden file on linux ( since it starts with a period). If you use “ls -a” you should see all files in the folder, including hidden files, if you could double check please ( before I start thinking very hard about positions where redirects could be (as those are the two common places )

I found a htaccess.txt with this inside :

RewriteEngine On

Announcements

RewriteRule ^announcements/([0-9]+)/[a-z0-9_-]+.html$ ./announcements.php?id=$1 [L,NC]
RewriteRule ^announcements$ ./announcements.php [L,NC]

Downloads

RewriteRule ^downloads/([0-9]+)/([^/]*)$ ./downloads.php?action=displaycat&catid=$1 [L,NC]
RewriteRule ^downloads$ ./downloads.php [L,NC]

Knowledgebase

RewriteRule ^knowledgebase/([0-9]+)/[a-z0-9_-]+.html$ ./knowledgebase.php?action=displayarticle&id=$
RewriteRule ^knowledgebase/([0-9]+)/([^/]*)$ ./knowledgebase.php?action=displaycat&catid=$1 [L,NC]
RewriteRule ^knowledgebase$ ./knowledgebase.php [L,NC]

OpenID Discovery Document (http://openid.net/specs/openid-connect-discovery-1_0.html)

RewriteRule ^.well-known/openid-configuration ./oauth/openid-configuration.php [L,NC]

it should be just a .htaccess rather than htaccess.txt