Listener mapping, URL masking

#1
Hi everyone,
I'm a first time OLS user and I had a few queries regarding mapping domains and masking of URLs or redirecting them.
Basically I have a EC2 instance with both Apache and OLS running on it. Apache is handling my production site duties and I'm running OLS on different ports for my other API's. So here's my list of questions:
1. Can I map a listener with the domain like: xyz.com/abc? Currently I'm using a sub-domain like abc.xyz.com which is working but we need the URL to be xyz.com/abc due to SEO reasons.
2. The sub-domain is running on port 3000 so I see the port in the URL. If point 1 above is possible then it clears up my issue significantly. If not then is there a way to mask the URL: abc.xyz.com:3000 and show the user the URL in the form xyz.com/abc?

Thanks in advance for any answers and sorry if the post is in the wrong section or not clear enough.
 
#3
Thanks for the reply Cold-Egg. It did not work. Our apache is currently handling all requests on ports 80 and 443 headed to xyz.com and we have also implemented CloudFront CDN. Could you explain a little more clearly about how to proceed? If you want I can explain our current setup in greater detail over DMs.
 

Cold-Egg

Administrator
#4
Right, static context is not enough for this case. Should use the proxy method.
May I know if abc.xyz.com:3000 is a nodeJS, not a WordPress site right?
First, you might want to set up a subfolder called abc, and make sure xyz.com/abc is loadable. For checking, you can add IP and xyz.com to your host file if needed.
Then, follow https://openlitespeed.org/kb/reverse-proxy-basics/ to set up an External App and Method 3: Proxying with Rewrite Rules

Example rewrite rules in case you needed
Code:
REWRITERULE (^abc.*) https://example.com/abc/$1 [P,E=Proxy-Host:example.com/abc]
if not working, maybe you can join golitespeed community on Slack, and msg me @eric
 
Top