Secured Connection but ERR_TOO_MANY_REDIRECTS on HTTP and HTTPS

when I searched SSL Certificate File, it isn't ssl-cert-snakeoil.pem:

Just to confirm, should I just still replace the two lines of

SSLCertificateFile      /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key

with:

SSLCertificateFile    /etc/letsencrypt/live/munikoy.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/munikoy.com/privkey.pem

?

Yes, I took a stab at what I thought would be in your default file.

Okay, I have changed the two lines into
SSLCertificateFile /etc/letsencrypt/live/munikoy.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/munikoy.com/privkey.pem

I also have reloaded Apache. What would be the next step?

  1. Verify that the SSL (self-signed cert) complaint is gone.
  2. Verify that redirection is in place.

Which editor did you use?
I can't see your site anymore...

Sorry TYPO
I do see it now - nice and secure :slight_smile:

How can I verify those two aspects?
Here is how default-ssl look like:

However the connection remain not secure:

I edited the two lines by typing on Terminal this:
sudo nano /etc/apache2/sites-enabled/default-ssl.conf

EDIT:
I checked on Safari and it is secure! Thank you :slight_smile: Do you know why the site comes off as not secure on Chrome? I have cleared my cache files but there is no padlock still. Just curious

Ok https://mukinoy.com and the www are secure.
Now to the redirection…
Which file has the :80 virtual host section?

Or maybe there is a simple checkbox in WordPress… to redirect http to https?
[ I don’t press words… ]

We are close to completion.
Please show (again):
ls -l /etc/apache2/sites-enabled/

In the event that you are unable to reply (due to new user limits), please reply directly via direct message.
Or create another account and continue on this topic here.

EDIT
I cant add more comments because of comment limit as new user so I have to wait 9 more hours.

Here is the content of sites-enabled/default-ssl.conf

There is only :443 vhost config info there and the HTTPS site is operational.
We need to locate the :80 vhost config file.
Please show the output of:
grep -ERi 'virtual|listen|DocumentRoot|ServerName|ServerAlias|80|443' /etc/apache2/

root@Portfolio : ~ # grep -ERi 'virtual|listen|DocumentRoot|ServerName|ServerAlias|80|443' /etc/apache2/

/etc/apache2/magic:10 80 string M.K. audio/x-mod

/etc/apache2/magic:10 80 string M!K! audio/x-mod

/etc/apache2/magic:10 80 string FLT4 audio/x-mod

/etc/apache2/magic:10 80 string FLT8 audio/x-mod

/etc/apache2/magic:10 80 string 4CHN audio/x-mod

/etc/apache2/magic:10 80 string 6CHN audio/x-mod

/etc/apache2/magic:10 80 string 8CHN audio/x-mod

/etc/apache2/magic:10 80 string CD81 audio/x-mod

/etc/apache2/magic:10 80 string OKTA audio/x-mod

/etc/apache2/magic:#>10 80 string >/0 %.2s-channel Fasttracker "oktalyzer" module sound data

/etc/apache2/magic:10 80 string 16CN audio/x-mod

/etc/apache2/magic:10 80 string 32CN audio/x-mod

/etc/apache2/magic:0 lelong&0x 8080 ffff 0x0000081a application/x-arc lzw

/etc/apache2/magic:0 lelong&0x 8080 ffff 0x0000091a application/x-arc squashed

/etc/apache2/magic:0 lelong&0x 8080 ffff 0x0000021a application/x-arc uncompressed

/etc/apache2/magic:0 lelong&0x 8080 ffff 0x0000031a application/x-arc packed

/etc/apache2/magic:0 lelong&0x 8080 ffff 0x0000041a application/x-arc squeezed

/etc/apache2/magic:0 lelong&0x 8080 ffff 0x0000061a application/x-arc crunched

/etc/apache2/magic:#0 string \367\312 TeX virtual font data

/etc/apache2/magic:20 80 string Microsoft\ Excel\ 5.0\ Worksheet application/excel

/etc/apache2/magic:20 80 string Microsoft\ Word\ 6.0\ Document application/msword

/etc/apache2/magic:20 80 string Documento\ Microsoft\ Word\ 6 application/msword

/etc/apache2/magic:0 lelong&0x 8080 ffff 0x0000081a application/x-arc

/etc/apache2/magic:0 lelong&0x 8080 ffff 0x0000091a application/x-arc

/etc/apache2/magic:0 lelong&0x 8080 ffff 0x0000021a application/x-arc

/etc/apache2/magic:0 lelong&0x 8080 ffff 0x0000031a application/x-arc

/etc/apache2/magic:0 lelong&0x 8080 ffff 0x0000041a application/x-arc

/etc/apache2/magic:0 lelong&0x 8080 ffff 0x0000061a application/x-arc

/etc/apache2/magic:# 0x9445366139FA (V 3. 80 )

/etc/apache2/apache2.conf:# virtual hosts, and extra configuration directives as flexible as possible, in

/etc/apache2/apache2.conf:# supposed to determine listen ing ports for incoming connections which can be

/etc/apache2/apache2.conf:# global configuration fragments, or virtual host configurations,

/etc/apache2/apache2.conf:# If you do not specify an ErrorLog directive within a < Virtual Host>

/etc/apache2/apache2.conf:# container, error messages relating to that virtual host will be

/etc/apache2/apache2.conf:# logged here. If you do define an error logfile for a < Virtual Host>

/etc/apache2/apache2.conf:# Include list of ports to listen on

/etc/apache2/apache2.conf:# access here, or in any related virtual host.

/etc/apache2/apache2.conf:# Include the virtual host configurations:

/etc/apache2/mods-enabled/ssl.conf: ## the main server and all SSL-enabled virtual hosts.

/etc/apache2/mods-enabled/ssl.conf: # Whether to forbid non-SNI clients to access name based virtual hosts.

/etc/apache2/mods-enabled/status.conf: # with the URL of http:// servername /server-status

/etc/apache2/mods-enabled/php7.0.conf: # only in specific virtual host or directory

/etc/apache2/ports.conf:# have to change the Virtual Host statement in

/etc/apache2/ports.conf: Listen 80

/etc/apache2/ports.conf: Listen 443

/etc/apache2/ports.conf: Listen 443

/etc/apache2/conf-enabled/security.conf:# Optionally add a line containing the server version and virtual host

/etc/apache2/conf-enabled/other-vhosts-access-log.conf:# Define an access log for Virtual Hosts that don't define their own logfile

/etc/apache2/conf-enabled/localized-error-pages.conf:# even on a per- Virtual Host basis. If you include the Alias in the global server

/etc/apache2/mods-available/info.conf: # http:// servername /server-info (requires that mod_info.c be loaded).

/etc/apache2/mods-available/cache_disk.conf: # put this into the configuration for just one virtual host.

/etc/apache2/mods-available/ssl.conf: ## the main server and all SSL-enabled virtual hosts.

/etc/apache2/mods-available/ssl.conf: # Whether to forbid non-SNI clients to access name based virtual hosts.

/etc/apache2/mods-available/status.conf: # with the URL of http:// servername /server-status

/etc/apache2/mods-available/php7.0.conf: # only in specific virtual host or directory

/etc/apache2/mods-available/reqtimeout.conf: # mod_reqtimeout per virtual host.

/etc/apache2/mods-available/reqtimeout.conf: # Note: Lower timeouts may make sense on non-ssl virtual hosts but can

/etc/apache2/mods-available/reqtimeout.conf: # cause problem with ssl enabled virtual hosts: This timeout includes

/etc/apache2/conf-available/security.conf:# Optionally add a line containing the server version and virtual host

/etc/apache2/conf-available/other-vhosts-access-log.conf:# Define an access log for Virtual Hosts that don't define their own logfile

/etc/apache2/conf-available/localized-error-pages.conf:# even on a per- Virtual Host basis. If you include the Alias in the global server

Binary file /etc/apache2/sites-available/.000-default.conf.swo matches

/etc/apache2/sites-available/000-default.conf.dpkg-dist:< Virtual Host *: 80 >

/etc/apache2/sites-available/000-default.conf.dpkg-dist: # The ServerNam directive sets the request scheme, hostname and port that

/etc/apache2/sites-available/000-default.conf.dpkg-dist: # redirection URLs. In the context of virtual hosts, the ServerName

/etc/apache2/sites-available/000-default.conf.dpkg-dist: # match this virtual host. For the default virtual host (this file) this

/etc/apache2/sites-available/000-default.conf.dpkg-dist: # However, you must set it for any further virtual host explicitly.

/etc/apache2/sites-available/000-default.conf.dpkg-dist: # ServerName www.example.com

/etc/apache2/sites-available/000-default.conf.dpkg-dist: DocumentRoot /var/www/html

/etc/apache2/sites-available/000-default.conf.dpkg-dist: # include a line for only one particular virtual host. For example the

/etc/apache2/sites-available/000-default.conf.dpkg-dist:</ Virtual Host>

/etc/apache2/sites-available/test.com.conf:< Virtual Host *: 80 >

/etc/apache2/sites-available/test.com.conf: DocumentRoot /var/www/html

/etc/apache2/sites-available/test.com.conf: ServerName mukinoy.com

/etc/apache2/sites-available/test.com.conf: ServerAlias www.mukinoy.com

/etc/apache2/sites-available/test.com.conf:</ Virtual Host>

/etc/apache2/sites-available/default-ssl.conf: < Virtual Host default: 443 >

/etc/apache2/sites-available/default-ssl.conf: ServerName mukinoy.com

/etc/apache2/sites-available/default-ssl.conf: DocumentRoot /var/www/html

/etc/apache2/sites-available/default-ssl.conf: </ Virtual Host>

/etc/apache2/sites-available/000-default.conf.orig:< Virtual Host *: 80 >

/etc/apache2/sites-available/000-default.conf.orig: DocumentRoot /var/www/html

/etc/apache2/sites-available/000-default.conf.orig:</ Virtual Host>

/etc/apache2/sites-available/000-default.conf:< Virtual Host *: 80 >

/etc/apache2/sites-available/000-default.conf: DocumentRoot /var/www/html

/etc/apache2/sites-available/000-default.conf: ServerName mukinoy.com

/etc/apache2/sites-available/000-default.conf: ServerAlias www.mukinoy.com

/etc/apache2/sites-available/000-default.conf:</ Virtual Host>

/etc/apache2/sites-available/000-default-le-ssl.conf:< Virtual Host *: 443 >

/etc/apache2/sites-available/000-default-le-ssl.conf: DocumentRoot /var/www/html

/etc/apache2/sites-available/000-default-le-ssl.conf: ServerName mukinoy.com

/etc/apache2/sites-available/000-default-le-ssl.conf: ServerAlias www.mukinoy.com

/etc/apache2/sites-available/000-default-le-ssl.conf:</ Virtual Host>

/etc/apache2/sites-available/default-ssl.conf.bak: < Virtual Host default: 443 >

/etc/apache2/sites-available/default-ssl.conf.bak: ServerName 165.227.41.221

/etc/apache2/sites-available/default-ssl.conf.bak: DocumentRoot /var/www/html

/etc/apache2/sites-available/default-ssl.conf.bak: # include a line for only one particular virtual host. For example the

/etc/apache2/sites-available/default-ssl.conf.bak: # Enable/Disable SSL for this virtual host.

/etc/apache2/sites-available/default-ssl.conf.bak: </ Virtual Host>

/etc/apache2/sites-available/mukinoy.com.conf:< Virtual Host *: 80 >

/etc/apache2/sites-available/mukinoy.com.conf: DocumentRoot /var/www/html

/etc/apache2/sites-available/mukinoy.com.conf: ServerName mukinoy.com;

/etc/apache2/sites-available/mukinoy.com.conf: ServerAlias www.mukinoy.com

/etc/apache2/sites-available/mukinoy.com.conf:</ Virtual Host>

/etc/apache2/sites-enabled/default-ssl.conf: < Virtual Host default: 443 >

/etc/apache2/sites-enabled/default-ssl.conf: ServerName mukinoy.com

/etc/apache2/sites-enabled/default-ssl.conf: DocumentRoot /var/www/html

/etc/apache2/sites-enabled/default-ssl.conf: </ Virtual Host>

I’m confused on where the HTTP site is being served from.

curl -Iki http://mukinoy.com/
HTTP/1.1 200 OK
Date: Thu, 21 Nov 2019 04:21:09 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Link: <http://mukinoy.com/wp-json/>; rel="https://api.w.org/"
Link: <http://mukinoy.com/>; rel=shortlink
Content-Type: text/html; charset=UTF-8

I see only one enabled vhost config: Which is for TLS (port 443).

Please show these files:
/etc/apache2/apache2.conf
/etc/apache2/sites-enabled/default-ssl.conf

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.