How to use the API with a host that blocks outgoing connections to 8083

Hello! I am in a bit of a pickle–

I have a WHMCS install on a host that does not allow outgoing connections to port 8083. I have confirmed the API works and the host is allowed API access via verifying all of the commands work on a different machine. I am hesitant to change the port of the panel to anything nonstandard, and was wondering if there is any way to make the API listen on a different port-- say 443 with a specific hostname.

Has anyone else encountered a similar problem? Is there anything I can do to try and get the connection working? Thank you for your help!

Yes, there is a way :wink:

You can use cp templates created by @eris https://github.com/jaapmarcus/web-templates/tree/master/templates/nginx:

If you use Nginx standalone:

cd /usr/local/hestia/data/templates/web/nginx/php-fpm/
wget https://github.com/jaapmarcus/web-templates/blob/master/templates/nginx/php-fpm/cp.tpl
wget https://github.com/jaapmarcus/web-templates/blob/master/templates/nginx/php-fpm/cp.stpl

Now create a new web domain or use the existing one and configure it to use cp as Web Template:

imagen

If you use Nginx+Apache2:

cd /usr/local/hestia/data/templates/web/nginx/
wget https://raw.githubusercontent.com/jaapmarcus/web-templates/master/templates/nginx/cp.tpl
wget https://raw.githubusercontent.com/jaapmarcus/web-templates/master/templates/nginx/cp.stpl

Now create a new web domain or use the existing one and configure it to use cp as Proxy Template:

imagen


Doing that you should be able to use the API on port 443.

1 Like

That is exactly what I needed and it works great! Thank you so much!

1 Like