How to setup a node js app as a subdomain of a regular website without modifying DNS?

I’m working on a project with low resources and many restrictions I need to deploy an app as a subdomain for an existing website, there are already some subdomains configured, and I have to maintain them while my website deploying my website as subdomain.

With this kind of structure:

https://example.comhttps://example.com/example

For the server, we are using CentOS 7, and it is configured with Apache.

There is already configured a virtualhost like this at /etc/httpd/conf.d:

<VirtualHost *:80>
        ServerName example.com
        #Redirect / https://example.com/
RewriteEngine on
RewriteCond %{SERVER_NAME} =example.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

The hosts file is also configured

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

I’m new to JavaScript and Node.js, so I tried this script:

import express from 'express';
import logger from 'morgan';


const port = process.env.PORT || 3000;

const app = express();
app.use(logger('dev'));


app.get('/', (req, res) => {
    res.send('Hello World');
});

app.listen(port, () => {
    console.log(`Server is running on port ${port}`);
});

I thought I could open other port, but I’m not sure how that could affect the SSL certificate. I have some issues modifying DNS, so my team prefered avoid to modificate it

In my first attempt, I was using Python, but I encountered too many issues with the server. I tried opening ports and was researching Name-Based Hosting and Virtual Hosting.