Skip to content

Reverse proxy

setup reverse proxy to localhost port

ex. domain.com/customPath -> localhost:3000 while port 3000 is not public

make file if not exist:

  • with ssl: /etc/apache2/conf.d/userdata/ssl/2_4/<user>/<user_domain>/custom_file.conf
  • without ssl: /etc/apache2/conf.d/userdata/std/2_4/<user>/<user_domain>/custom_file.conf
ServerName beta.example.com #this line may not be required (havent checked)
ProxyPass /customPath http://127.0.0.1:3000
ProxyPassReverse /customPath http://127.0.0.1:3000

read more

(modify virtual hosts on cpanel)[https://docs.cpanel.net/ea4/apache/modify-apache-virtual-hosts-with-include-files/]