In some scenarios, you may want to disable the Apache mod_proxy module and use curl module for php instead.
This action will affect functionalities like the SSH console from the ClusterControl UI or demo license requests for new installations.
Steps
1. Modify the Apache Configuration:
Edit the file /etc/httpd/conf.d/cc-frontend.conf
(or cc-webapp.conf
depending on the version) to adjust which modules are included.
This is an example of the default Apache configuration for ClusterControl:
<VirtualHost *:80>
ServerName servername.local
Redirect permanent / https://10.10.10.10
</VirtualHost>
<VirtualHost *:443>
ServerName servername.local
ServerAlias *.servername.local
#ErrorLog /var/log/httpd/cc-frontend-error.log
#CustomLog /var/log/httpd/cc-frontend-access.log combined
# HTTP Strict Transport Security (mod_headers is required) (63072000 seconds)
Header always set Strict-Transport-Security "max-age=63072000"
# required modules: rewrite
IncludeOptional /usr/share/cmon/apache/cc-frontend-web-app.conf
# required modules: proxy,proxy_http
IncludeOptional /usr/share/cmon/apache/cc-frontend-cmon-api.conf
IncludeOptional /usr/share/cmon/apache/cc-frontend-license.conf
# required modules: ssl
IncludeOptional /usr/share/cmon/apache/cc-frontend-tls.conf
# required modules: php
# debian: apt install libapache2-mod-php
# rhel: yum install php
# php curl module is required
# IncludeOptional /usr/share/cmon/apache/cc-frontend-php-proxy-curl.conf
</VirtualHost>
2. Comment Out Proxy Modules:
Locate and comment out the following lines to disable the Apache mod_proxy.
# IncludeOptional /usr/share/cmon/apache/cc-frontend-cmon-api.conf
# IncludeOptional /usr/share/cmon/apache/cc-frontend-license.conf
The cc-frontend-cmon-api.conf
option is needed for cmon api to work but it will be replaced by the cc-frontend-php-proxy-curl.conf
php script in the next step.
3. Enable PHP proxy curl:
Uncomment the following line.
IncludeOptional /usr/share/cmon/apache/cc-frontend-php-proxy-curl.conf
4. Verify Required Modules:
Ensure that the necessary modules are installed. You will need the php
and httpd
packages, and also php-curl
.
$ sudo yum install php php-curl httpd
5. Restart Apache:
Restart the Apache service to apply the new configuration.
$ sudo systemctl restart httpd
1. Modify the Apache Configuration:
Edit the file /etc/apache2/sites-available/cc-frontend.conf
(or cc-webapp.conf
depending on the version) to adjust which modules are included.
This is an example of the default Apache configuration for ClusterControl:
<VirtualHost *:80>
ServerName servername.local
Redirect permanent / https://10.10.10.10
</VirtualHost>
<VirtualHost *:443>
ServerName servername.local
ServerAlias *.servername.local
#ErrorLog /var/log/httpd/cc-frontend-error.log
#CustomLog /var/log/httpd/cc-frontend-access.log combined
# HTTP Strict Transport Security (mod_headers is required) (63072000 seconds)
Header always set Strict-Transport-Security "max-age=63072000"
# required modules: rewrite
IncludeOptional /usr/share/cmon/apache/cc-frontend-web-app.conf
# required modules: proxy,proxy_http
IncludeOptional /usr/share/cmon/apache/cc-frontend-cmon-api.conf
IncludeOptional /usr/share/cmon/apache/cc-frontend-license.conf
# required modules: ssl
IncludeOptional /usr/share/cmon/apache/cc-frontend-tls.conf
# required modules: php
# debian: apt install libapache2-mod-php
# rhel: yum install php
# php curl module is required
# IncludeOptional /usr/share/cmon/apache/cc-frontend-php-proxy-curl.conf
</VirtualHost>
2. Comment Out Proxy Modules:
Locate and comment out the following lines to disable the Apache mod_proxy.
# IncludeOptional /usr/share/cmon/apache/cc-frontend-cmon-api.conf
# IncludeOptional /usr/share/cmon/apache/cc-frontend-license.conf
The cc-frontend-cmon-api.conf
option is needed for cmon api to work but it will be replaced by the cc-frontend-php-proxy-curl.conf
php script in the next step.
3. Enable PHP proxy curl:
Uncomment the following line.
IncludeOptional /usr/share/cmon/apache/cc-frontend-php-proxy-curl.conf
4. Verify Required Modules:
Ensure that the necessary modules are installed. You will need the php
and apache2
packages, and also php-curl
.
$ sudo apt install php php-curl apache2
5. Restart Apache:
Restart the Apache service to apply the new configuration.
$ systemctl restart apache2
After completing these steps, your Apache configuration will be set up to use the cc-frontend-php-proxy-curl.conf
php script instead of mod_proxy
.