-
Notifications
You must be signed in to change notification settings - Fork 580
WHM Easy Apache 4 Hypnotoad with Unix Sockets
This page describes the process of manually configuring a Mojo Hypnotoad application using unix socket to run behind a Virtual Domain Apache configuration within a current version of cPANEL WHM.
Performed entirely through shell and assumes that you are the administrator of the WHM Server with admin/root access.
Configuring the customisation of the Virtual Host proxy can also be done through the WHM web console as described in the cPanel EA4 Docs
$PATH_TO_UNIX_SOCKET_FILE = "%2Fhome%2Fcpanel_username%2Fmy.sock";
app->config(
hypnotoad => {
listen => ["http+unix:$PATH_TO_UNIX_SOCKET_FILE"],
}
);
Then launch using hypnotoad myapp.pl
NB - depending on your configuration you may need to grant permissions on the .sock file
Create the path subdirectories beneath for /etc/apache2/conf.d/ conf file for user
nano /etc/apache2/conf.d/userdata/ssl/2_4/$CPANEL_USERNAME/$CPANEL_USER_DOMAIN/mojo.conf
## add the proxy httpd conf configuration in a format similar to
ProxyPass / unix:$PATH_TO_UNIX_SOCKET_FILE|http://$CPANEL_USER_DOMAIN/
ProxyPassReverse / unix:$PATH_TO_UNIX_SOCKET_FILE|http://$CPANEL_USER_DOMAIN/
NB: replace appropriate values above into $CPANEL_USERNAME $CPANEL_USER_DOMAIN $PATH_TO_UNIX_SOCKET_FILE
/usr/local/cpanel/scripts/rebuildhttpdconf
/usr/local/cpanel/scripts/restartsrv_httpd