I have a problem when i change apache url to HTTPS. Before the change every this working fine with http. Now my company need to use the Virtal ip by HTTPS. so that i didn't find any suitable tutorial about this issue.
i am working on debian 9. more details are below:
/etc/apache2/status.conf
<Location /server-status>
SetHandler server-status
Order Deny,Allow
Deny from all
Require local
</Location>
/etc/apache2/sites-available/000-default.conf
<VirtualHost *:80>
.....
DocumentRoot /var/www/html
Redirect "/" "https://ip_address/"
....
</VirtualHost>
Error i received
Failed Actions:
* Apache_monitor_0 on server1 'unknown error' (1): call=59, status=complete, exitreason='none',
last-rc-change='Wed Sep 9 17:28:19 2020', queued=0ms, exec=71ms
* pgsqld_promote_0 on server2 'unknown error' (1): call=63, status=complete, exitreason='server1 is the best candidate to promote, aborting current promotion',
last-rc-change='Wed Sep 9 16:57:25 2020', queued=0ms, exec=496ms
I tried to add resource like this but it didn't work
pcs resource create Apache ocf:heartbeat:apache configfile=/etc/apache2/apache2.conf statusurl="https://localhost/server-status" op monitor interval=1min --force
pcs resource create Apache ocf:heartbeat:apache configfile=/etc/apache2/apache2.conf statusurl="http://localhost/server-status" op monitor interval=1min --force
I created ssl file and remove status.conf file
/sites-available/default-ssl.conf
<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
.....................
<Location /server-status>
SetHandler server-status
Order Deny,Allow
Deny from all
Require local
</Location>
................................
</VirtualHost>