Redirect Hits to another in-house server

 
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting
View previous topic :: View next topic  
Author Message
James Cook
-


Joined: 13 Oct 2018
Posts: 13
Location: Michigan USA

PostPosted: Thu Aug 24, 2023 6:44 pm    Post subject: Redirect Hits to another in-house server Reply with quote

I'm running a second server that has to run on an older OS for some cgi apps.

I've been struggling to get URL Rewriting to pass all hits to one specific domain name forwarded to that machine.

First of all, on the primary server, I get errors when I leave the Documents path empty. I can enter paths but don't want them used.

But in URL rewriting I've been unable to figure out what I need there. I've enabled a Global rule with the virtual path as: TheURL.com. I've tried adding regex wildcards to it too: .*TheURL.com.*.

If the rule is matched, it should forward to the internal IP address I've entered.

Am I trying to do something that can't be done? Or am I missing something on how to do it?
_________________
Jim
Back to top View user's profile Send private message
pkSML
-


Joined: 29 May 2006
Posts: 955
Location: Michigan, USA

PostPosted: Mon Aug 28, 2023 4:19 pm    Post subject: Reply with quote

Hi Jim. What you probably are looking for is Reverse Proxy. In response to being accessed, it queries the backend server (your older OS system) and relays the data it returns to the visitor.

URL rewriting, if that's what you want to use, will require a world-accessible server and domain (i.e. NOT a LAN address) if you want the internet to access it.

But it sounds much more like you want reverse proxy.
_________________
Stephen
Need a LitlURL?


http://CodeBin.yi.org
Back to top View user's profile Send private message Visit poster's website
James Cook
-


Joined: 13 Oct 2018
Posts: 13
Location: Michigan USA

PostPosted: Tue Aug 29, 2023 3:24 pm    Post subject: Reply with quote

pkSML wrote:
But it sounds much more like you want reverse proxy.

Thanks, that's exactly what I need but failed to find.

I'm struggling to figure out what the paths should be: Virtual Path, Remote Virtual Path, and even the site's Documents Path since it can't be left blank. I'll work on it and research, but suggestions will not be rejected. :-)

FWIW, I'm not trying to reach just a Python script or something, but this is a relay to another fully functioning web server running Abyss and one cgi driven web site. So I'm trying to pass the whole request along to that machine.
_________________
Jim
Back to top View user's profile Send private message
pkSML
-


Joined: 29 May 2006
Posts: 955
Location: Michigan, USA

PostPosted: Tue Aug 29, 2023 4:20 pm    Post subject: Reply with quote

James Cook wrote:
I'm struggling to figure out what the paths should be: Virtual Path, Remote Virtual Path, and even the site's Documents Path since it can't be left blank. I'll work on it and research, but suggestions will not be rejected. :-)


That all depends on where you want accessibility to be from and to. I'm sure that doesn't clear it up, so here's a little more info...

Notice the terms:
"Local" --> on this web server
"Remote" --> on the backend server
"Virtual Path" --> the files don't really live here -- it's more like a shortcut -- not a file but it points to something that is

The local virtual path (LVP) is what someone enters to reach the backend server (either your Abyss or CGI site).
So if you want your backend site to be accessible at https://mysite.net/backend/index.htm, the local virtual path would be /backend.
If you want the entire domain/subdomain to hit the backend server, it would simply be /. In other words, if you want https://mysite.net/index.htm to hit the backend server, use just a slash.

The remote virtual path (RVP) is the "folder" part of the URI on your backend server that you want to reach. So if the URI is /awesome_application/index.htm, the remove virtual path would be /awesome_application.
If you want to hit the document root of the backend server, the remote virtual path is simply /.

James Cook wrote:

FWIW, I'm not trying to reach just a Python script or something, but this is a relay to another fully functioning web server running Abyss and one cgi driven web site. So I'm trying to pass the whole request along to that machine.


If you're saying you just want to go to https://mysite.net and hit the / URI of the backend server, use slashes for both the local virtual path and remote virtual path.

And note that anything beyond the virtual path is appended to the request.

Example: If your LVP is /backend and your RVP is /awesome_application and you're loading the URL https://mysite.net/backend/index.htm, Abyss will ask the backend server for /awesome_application/index.htm.

Does that make things a clearer? If not, provide an example of the URL you want to access and what URL you Abyss to access on the backend server.

If your LVP is /, then that renders the document root of the host you're working with pointless, so it can be anywhere, e.g. the Abyss htdocs folder.

And it's cool to run into another Abyss user from Michigan!
_________________
Stephen
Need a LitlURL?


http://CodeBin.yi.org
Back to top View user's profile Send private message Visit poster's website
James Cook
-


Joined: 13 Oct 2018
Posts: 13
Location: Michigan USA

PostPosted: Wed Aug 30, 2023 3:49 pm    Post subject: Reply with quote

Thank you. I recognize and appreciate the degree of your response. I'll certainly get to work in applying it.

And yes about Michigan, but I'm sure there are many more wise enough to use Abyss. I'm actually working to motivate a whole group of people to build their own cgi sites which is why I've had to set up this second server.
_________________
Jim
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> URL Rewriting All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group