Subdomain proxy VH template for all users (cpanel)

#1
I use Litespeed 6.0.1 on cPanel (CloudLinux)

I want the subdomain foo.exmple.com point to 127.0.0.1:8080 (via ProxyPass or ProxyPassReverse) for all of the users of cPanel server.

I want to apply this modification on default virtual host template effect all users accounts. (Looks like cpanel.example.com which is pointing to example.com:2082)

I can do this via .htaccess file:

Apache config:
RewriteEngine On
RewriteRule ^(.*)$ http://127.0.0.1:8080/$1 [P,L]
But it only works per account while there are +1000 domains on my server and I can't repeat that manually. (Also the user can delete or modify .htaccess file)

How can I perform that for all accounts/domains?
 
Top