Service does not work over HTTPS when using custom port, but works with HTTP

0

Have two services running in Lightsail node instance, one on port 8080 and second on 8081. I've made mappings to access service 1 from :80 and service 2 from :3080. In case of HTTPs it should map :443 and :3443 respectively. Everything works fine for HTTP, but adding HTTPS cannot access :3443 over network - getting timeout.

Can access over HTTP the <static_ip>:80 and <static_ip>:3080 without any issues. Over HTTPS however, <domain or distribution address>:3443 times out. But <domain or distribution address>:80 is working fine.

TL;DR my custom port is not working over https. Firewall rule for 3080 and 3443 is added.

Here is config changes I've made to bitnami apache configs:

To: /opt/bitnami/apache/conf/vhosts/https-vhost.conf

<VirtualHost 127.0.0.1:3443 _default_:3443>
  ServerName www.example.com
  ServerAlias *
  SSLEngine on
  SSLCertificateFile "/opt/bitnami/apache/conf/bitnami/certs/server.crt"
  SSLCertificateKeyFile "/opt/bitnami/apache/conf/bitnami/certs/server.key"
  DocumentRoot /opt/bitnami/projects/sample
  <Directory "/opt/bitnami/projects/sample">
    Options -Indexes +FollowSymLinks -MultiViews
    AllowOverride All
    Require all granted
  </Directory>
  ProxyPass / http://localhost:8081/
  ProxyPassReverse / http://localhost:8081/
</VirtualHost>

To: /opt/bitnami/apache/conf/bitnami/bitnami-ssl.conf

..
Listen 3443
..

To: /opt/bitnami/apache/conf/bitnami/bitnami.conf

..
<VirtualHost _default_:3080>
  DocumentRoot "/opt/bitnami/apache/htdocs"
  <Directory "/opt/bitnami/apache/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
  </Directory>

  ProxyPass / http://localhost:8081/
  ProxyPassReverse / http://localhost:8081/

  # Error Documents
  ErrorDocument 503 /503.html
</VirtualHost>
..

To: /opt/bitnami/apache/conf/httpd.conf

..
Listen 3080
..

Pardon my overall ignorance & thanks for any help debugging

Miks
asked a month ago108 views
2 Answers
0

Hello.

Since "127.0.0.1:3443" is a local host, why not try deleting it as follows?

<VirtualHost *:3443 _default_:3443>
  ServerName www.example.com
  ServerAlias *
  SSLEngine on
  SSLCertificateFile "/opt/bitnami/apache/conf/bitnami/certs/server.crt"
  SSLCertificateKeyFile "/opt/bitnami/apache/conf/bitnami/certs/server.key"
  DocumentRoot /opt/bitnami/projects/sample
  <Directory "/opt/bitnami/projects/sample">
    Options -Indexes +FollowSymLinks -MultiViews
    AllowOverride All
    Require all granted
  </Directory>
  ProxyPass / http://localhost:8081/
  ProxyPassReverse / http://localhost:8081/
</VirtualHost>

After changing the settings, restart httpd using the command below.
https://docs.bitnami.com/aws/faq/administration/control-services/

sudo /opt/bitnami/ctlscript.sh restart
profile picture
EXPERT
answered a month ago
profile picture
EXPERT
reviewed a month ago
0

Did you add a Firewall rule on your Instance to allow public traffic through port 3443?

https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-editing-firewall-rules.html

AWS
MODERATOR
answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions