Forum
Port 80 redirection
Hi! I'm experiencing a problem with Perch, which started to happen after the installation of an SSL certificate.
Perch should be accessible through the URL https://example.com/cms. When I enter this URL, it gets redirected to https://example.com:80/cms/ which causes a security connection error (ERR_SSL_PROTOCOL_ERROR). If I remove the :80 part of the URL manually, I can access the login page normally. But, after I login, I get the :80 redirection again (https://example.com:80/cms/core/apps/content/) and the SSL error.
This wasn't happening before the installation of the SSL certificate, so I'm not sure if the error is related to a server configuration, or if I can change some settings in Perch (or make a clean install) in order to make it work again.
Here is the diagnostics report:
Perch: 2.8.34, PHP: 7.0.9, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: 241ae00989d1995ffcbbf63d579943635faf9972 $, with PDO
Server OS: Linux, litespeed
Installed apps: content (2.8.34), assets (2.8.34), categories (2.8.34)
App runtimes: <?php $apps_list = array( 'content', 'categories', );
PERCH_LOGINPATH: /cms
PERCH_PATH: /home/ht149/www.just.com.pl/cms
PERCH_CORE: /home/ht149/www.just.com.pl/cms/core
PERCH_RESFILEPATH: /home/ht149/www.just.com.pl/cms/resources
Image manipulation: GD Imagick
PHP limits: Max upload 128M, Max POST 128M, Memory: 128M, Total max file upload: 128M
F1: 6a33f95eca3667f9e0c39bf5ca2980fe
Resource folder writeable: Yes
HTTP_HOST: just.com.pl
DOCUMENT_ROOT: /home/ht149/www.just.com.pl
REQUEST_URI: /cms/core/settings/diagnostics/
SCRIPT_NAME: /cms/core/settings/diagnostics/index.php
I don't believe Perch is involved in that port 80 redirect. It's just not something we do.
A good way to test would be to try going to an image with the correct URL and see if you still get the redirect. If you do, it's definitely server configuration and not Perch.
Drew, I tested different files and directories by their URLs, but this issue only happens when I access these URLs within Perch: /cms, /cms/core/apps/content/ (only after login), and /cms/core/apps/categories/
Interesting. Do you have
PERCH_SSL
enabled? If so, turn it off. We don't set a port when we redirect, but it's possible that something else is, and then Perch is inheriting that setting.I turned PERCH_SSL off. Unfortunately it makes no difference.
How are you testing? Remember a browser can cache redirect responses.
Can you show me your extended diagnostics report?
I'm testing in different browsers, OSs, and networks, mostly ones that never accessed these URLs.
Here is the extended diagnostics report:
So when I go here, there's no problem:
The
:80
redirect happens when I go here:So it looks like it's something to do with how your server is handling the redirect to a default document.
At this point it would probably be best to ask your server administrator to get their opinion.
I'll do it. Thanks for the help!