CyberPanel Community

How to pass proxy? nodejs

mi
mihai_icey #1

Hello,
I have implemented a nodejs application in Cyberpanel, everything is fine and it works well.

But I ran into a problem.
Nodejs is on website.com/, now I can’t access the website.com/api subdomain.
Is there a way to pass that /api?

I’ve read is a config server, but I honestly can’t find the solution.

2 replies
sh
shoaibkk #2

This is a sub directory i think you need to add right htaccess rule for that

mi
mihai_icey #3

yes. it’s a subdirectory.

I did with: RewriteRule /api/(.*) http://127.0.0.1/api/$1 [P]
but it didn’t work.

I did something wrong?

I am new with the servers and stuff and I try to understand

Sign in to reply