Custom line of code in httpd.conf is removed after cPanel updates

Fictive Logics

Registered
Dec 13, 2017
3
0
1
Australia
cPanel Access Level
Root Administrator
I have a ratchet php chat server running on a cpanel server running on EC2. Because ratchet does not support https protocol I have to bypass https request to http via a proxybypass on apache httpd.conf as ProxyPass /wss2/ ws://www.yourdomain.com:8888

Whenever cpanel is updated this line of code is being removed from httpd.conf how can I make sure that this remains intact even if cpanel updates and rebuilds apache config or server restarts. IF you can give me step by step instruction or a link to post that resolves this issue.

Thank You
 

kdean

Well-Known Member
Oct 19, 2012
369
61
78
Orlando, FL
cPanel Access Level
Root Administrator
In WHM, go to Apache Configuration --> Include Editor.

Then add the code to the appropriate location you want it to be inserted: Pre Main Include, Pre VirtualHost Include, Post VirtualHost Include.