I think it's because it has been defined in two different files. Editing in any of the files causes error. How to manage this.
Insert a ServerName
statement in the file that has none.
And use a name that in NOT is use/will NOT conflict with any current, or future name, like:
ServerName unused
httpd-vhosts.conf has the statement ServerName angelone.algomatixrt.com
Inserted the statement: ServerName unused in bitnami.conf
Still this sudo DUMP_VHOSTS gives the same result.
Moreover, HTTP requests are not redirecting to HTTPS, though VirtualHost parameters contain Rewrite statement in bitnami.conf
Please show:
Please show:
Did you restart/reload Apache
?
Yes. After adding the statement ServerName unused in bitnami.conf, restarted Apache.
Here's the screenshot:
VirtualHost configuration:
127.0.0.1:80 status.localhost (/opt/bitnami/apache/conf/vhosts/00_status-vhost.conf:1)
*:80 is a NameVirtualHost
default server angelone.algomatixrt.com (/opt/bitnami/apache/conf/extra/httpd-vhosts.conf:23)
port 80 namevhost angelone.algomatixrt.com (/opt/bitnami/apache/conf/extra/httpd-vhosts.conf:23)
alias www.angelone.algomatixrt.com
port 80 namevhost unused (/opt/bitnami/apache/conf/bitnami/bitnami.conf:6)
*:443 angelone.algomatixrt.com (/opt/bitnami/apache/conf/bitnami/bitnami-ssl.conf:15)
That is better.
Does everything work as expected?
Yes, it works. It's just that HTTP to HTTPS redirection is creating issues.
Let's have a look at the vhost:
The HTTP to HTTPS redirections look fine to me:
curl -Ii http://angelone.algomatixrt.com/
HTTP/1.1 302 Found
Date: Tue, 25 Jul 2023 05:41:24 GMT
Server: Apache
Location: https://angelone.algomatixrt.com/
Content-Type: text/html; charset=iso-8859-1
curl -Ii http://www.angelone.algomatixrt.com/
HTTP/1.1 302 Found
Date: Tue, 25 Jul 2023 05:41:30 GMT
Server: Apache
Location: https://www.angelone.algomatixrt.com/
Content-Type: text/html; charset=iso-8859-1
I don't see any redirects defined in that VirtualHost. So, I am not sure how that could be happening.
I do see a syntax error though. Your DocumentRoot folder has a quote at the start but there is no ending quote. I don't think this is causing any problems but it is good practice to always match quotes.
I also see the redirects happening like @rg305 did. But, this VirtualHost is not the one processing requests to that domain.
Is your public IP still correct? What does this show?
curl -4 http://ifconfig.io
Public IP is correct, and it shows 52.220139.108
I have added the ending quote (realised after sending the screen shot).
HTTPS redirection works. (It also serves HTTP request if speficially given http://angelone.algomatixrt.com)
- if specifically given, it serves as Not secured site.
The HTTP to HTTPS redirect no longer happens. You will need to add that to the HTTP VirtualHost. I don't know why it redirected before without that.
Your HTTPS cert looks fine to me. You can see it in SSL Checker site like below. What were the details of the "not secured" message?
NOTE: As I type this I see your site is now offline but it was online when I started typing.
From DNS, I get a different IP:
Name: angelone.algomatixrt.com
Address: 3.7.159.231

Name: angelone.algomatixrt.com Address: 3.7.159.231
Was just trying replicating on other server to find the root cause.
Original IP remains 52.220.139.108.
SSL Checker give "handshake failed" result for Port:80, and no issues for Port:443, though the config is fine.

SSL Checker give "handshake failed" result for Port:80
As it should?
There should be no TLS cert there for it to handshake with.

if specifically given, it serves as Not secured site.
Are you still having this problem now that your IP is back? What are the details of the error message?

The HTTP to HTTPS redirect no longer happens. You will need to add that to the HTTP VirtualHost. I don't know why it redirected before without that.
The redirection still isn't working.

The redirection still isn't working.
Redirection isn't working. All config files have right contents (atleast that's what I could see). It works only if explicitly mention HTTPS. Otherwise it doesn't go to https.