Excluding ports from automatic http to https redirection

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command: certbot certonly --apache

It produced this output:

My web server is (include version): apache2

The operating system my web server runs on is (include version): Ubuntu 20.04

My hosting provider, if applicable, is: N/A

I can login to a root shell on my machine (yes or no, or I don't know): yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot 1.24.0

The issue I am having is that I need to run a legacy application that doesn't support https, however certbot keeps making it automatically forward http to https. This means I can't access the legacy application. Is there any way to remove automatic forwarding for specific ports (the application is on a non-standard port)? I need other applications to still support https.

1 Like

Hi @evidentflame and welcome to the LE community forum :slight_smile:

Yes, please show the output of:
apachectl -t -D DUMP_VHOSTS

And tell us which FQDN you are wanting to NOT forward to HTTPS.

3 Likes

Thanks for the welcome :slightly_smiling_face:

VirtualHost configuration:
*:4430                 127.0.0.1 (/etc/apache2/sites-enabled/000-default-le-ssl.conf:2)
*:8080                 127.0.0.1 (/etc/apache2/sites-enabled/000-default.conf:1)

I want my domain to still redirect, but I am running an application on port 8098 that I don't want redirected to https. It needs to stay as http.

Figured it out. Revoked and recreated the cert with the --no-redirect option. Changed in application settings for the other services I have to automatically link to https and block http.

Revoking was unnecessary.

4 Likes

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