First, I apologize for yet another ProxyPass question, I have been reading through many of them, and answers provided, and I still cannot identify what I am doing wrong.
I have 3 sudomains: cloud.example.com wiki.example.com other.example.com.
other.example.com has been running fine on host A with https
cloud.example.com has been running fine on host B with https after forwarding with ProxyPass
wiki.example.com is just added on host A as an application listening on other port, and is currently only http until I resolve this issue and get SSL configured with Lets Encrypt and certbot
Currently when browsing to other and cloud subdomains they redirect to the https page automatically as desired.
When browsing to the wiki subdomain, it also gets redirected to https where it is not listening, and then displays wiki.example.com in the address bar while serving up the domain/other.subdomain content. I have verified using the IP and port that it is running and listening on http. Message in the apache access log shows apache is receiving request for https and cannot find the https://wiki.example.com.
x.x.x.x - - [29/Jan/2022:14:05:16 -0700] "GET /favicon.ico HTTP/1.1" 404 513 "https://wiki.example.com/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36"
I have been using firefox primarily and after disabling all features forcing https, and deleting all entries related to my site from the Library the issue remained. I then tried chromium which I have never used for the site, and the issue remained.
I am having trouble identifying why the wiki subdomain is being redirected to https. Below is the example.com.conf section where the cloud subdomain is working, and where the wiki subdomain is attempted. I have tried without the extra rewrite rules, with other rules listed on other answers, and nothing has changed.
I am guessing I have a configuration somewhere for apache that is forcing all connections to https, but I cannot locate where it is.
<VirtualHost *:80>
ServerName cloud.example.com
ServerAlias cloud.example.com
ProxyPreserveHost On
ProxyPass / http://host B IP/
ProxyPassReverse / http://Host B IP/
RewriteEngine on
RewriteCond %{SERVER_NAME} =cloud.example.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost *:80>
ServerName wiki.example.com
ServerAlias wiki.example.com
ProxyPreserveHost On
ProxyPass / http://Host A IP:3000/
ProxyPassReverse / http://Host A IP:3000/
RewriteEngine on
RewriteCond %{SERVER_NAME} =wiki.example.com
RewriteRule ^ http://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
Not 100% sure why, but after connecting from another source with private mode it loaded fine, then began loading fine from everywhere. Strange, but resolved.