hi. i have installed a ssh panel on my vps , but bcuz my country keep filtering th ips , i need to forward my iran vps to my digital ocean vps . my ssh panel using apache and the panel will open with this link :
but i wanna open the panel with :
t1 is the domain of my iran vps , so what i need is when someone enter t1.domain.com/p iran server forward this request to digital server and open t2.domain.com/p
i did forward my ssh port with socat so my clients can connect to digital ssh throw my iran vps server easily but bcuz this panel doesn’t have any port on the domain i don’t know how to forward it .
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Heya,
To set up the forwarding of your SSH panel from your Iran VPS to your DigitalOcean VPS using a web URL, you can use a reverse proxy setup. Since you mentioned your SSH panel is running with Apache, you can configure Apache on your Iran VPS to act as a reverse proxy that forwards requests from
t1.domain.com/p
tot2.domain.com/p
.Here’s a step-by-step guide on how to do this:
Step 1: Enable Proxy Modules
First, you need to ensure that the necessary proxy modules are enabled in Apache on your Iran VPS. You can do this by running the following commands:
Step 2: Configure Your Virtual Host
Next, you’ll need to create or edit a virtual host file for
t1.domain.com
. Here’s how you can set it up:t1.domain.com
, you can create one:This configuration tells Apache to forward any requests for
t1.domain.com/p
tot2.domain.com/p
, while also handling the response headers so that the client’s browser behaves as if it were communicating directly with the origin server.Step 3: DNS and Firewall Configuration
t1.domain.com
are correctly pointing to your Iran VPS.