Connecting a virtual server to a site on the Tor network

I have a server on which I have a site. Site address: example.com
Now there is a site on the tour network with this address: example.onion

I want port 2023 of my site to connect to the site that is in the torrent network

For example, if I open the following link: example.com:2023/file.zip Download the file from this address: example.onion/file.zip

Is there a safe solution for this?

You could use snippets from Tor2web - Wikipedia - but the project seems quite inactive.