Our features site is undergoing a refresh! Be sure to explore the revamped site and discover our latest product roadmap launching here on Monday, March 18th.

Make it easier to set up mod_proxy configurations for websites / webapps via direct cPanel input

ylluminate shared this idea 5 years ago
Open Discussion

As a System Administrator, I would like the process for setting up proxying to other servers to be simplified in cPanel so that it is more straightforward and easier to understand.


==========


Currently setting up the mod_proxy's ProxyPass + ProxyPassReverse is a bit too involved and quirky when doing this from the shell. The steps involved essentially are:

  • Enable mod_proxy in EasyApache
  • Edit Vhost custom includes, by creating and adding content to:

/usr/local/apache/conf/userdata/ssl/2_4/cPanel-Username/yourdomain.com/proxy_pass.conf
/usr/local/apache/conf/userdata/std/2_4/cPanel-Username/yourdomain.com/proxy_pass.conf
  • Enable custom Vhost: /scripts/ensure_vhost_includes --user=cPanel-User
  • Add custom rules to the two above files created in Step #2:
    #Apache Reverse Proxy
    SSLProxyEngine on
    
    <Location />
    ProxyPass http://192.168.168.168:18080/
    ProxyPassReverse http://192.168.168.168:18080/
    </Location>
  • service httpd configtest


As you can see, this is error prone and can present some confusion. With more and more deployments being done via Docker and other options, it is critical that cPanel simplify the process for setting up proxying to other servers (such as other Linodes at the NOC or such) that may run websites or other critical web services that cPanel customers still want to run through cPanel generally.


Additionally, this should probably be done via cPanel vs WHM.

Replies (1)

photo
1

in my server, I use conf.d instead

Leave a Comment
 
Attach a file