I have a VPS with 2 services at different ports and self signed SSL for an IP. It is Supabase at port 8000
and t-rex service at port 6767
. I need them both on HTTPs like https://192.0.2.1:8000
for Supabase & https://192.0.2.1:6767
for t-rex.
I works with HTTP but how to do this with HTTPS? I tried it with Apache2, and it works. But I have no idea how to add 6767
? As I understand HTTPS is on port 443
.
<VirtualHost 192.0.2.1:443>
ServerName 192.0.2.1:8000
SSLEngine on
SSLProxyEngine On
SSLCertificateFile /etc/ssl/certificate.crt
SSLCertificateKeyFile /etc/ssl/private/private.key
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://192.0.2.1:8000/
ProxyPassReverse / http://192.0.2.1:8000/
</VirtualHost>
SSLEngine on
SSLCertificateFile /etc/ssl/certificate.crt
SSLCertificateKeyFile /etc/ssl/private/private.key
SSLCertificateChainFile /etc/ssl/ca_bundle.crt
If this is not possible with Apache2, NGINX is fine, too.
<Virtual Host 172.246.6.*:8000>
,<VirtualHost 172.246.6.*:6767>
, and no server name for either of them, just the raw IP address - with no port - since that's what you're using now.