Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: mod_md MDNotifyCmd command |
|
Author |
|
sailor
Joined: 17 Apr 2015 Posts: 82 Location: US
|
Posted: Thu 08 Dec '22 19:07 Post subject: mod_md MDNotifyCmd command |
|
|
On Windows 2012R2 I have Apache 2.4.54 and mod_md (v2.4.17) config entry:
MDNotifyCmd d:/apache_files/md_restart.cmd
In log it looks like it renewed a cert ok, then:
(OS 6)The handle is invalid. : AH02965: Child: Unable to retrieve my generation from the parent\r\n
AH10059: The Managed Domain mydomain.com has been setup and changes will be activated on next (graceful) server restart.
contents of restart:
d:
rem cd \apache_files
rem net stop "Apache24-2"
rem \jobs\unix\sleep 5
rem net start "Apache24-2"
cd D:\apache24-2\bin
httpd -k restart
echo %1 %2 domain renewed and Apache24-2 restarted > email.txt
D:\jobs\blat email.txt -t sme@home.com -s %computername%-md_restart.cmd -server oursmtp.com -f webalert@home.com -noh
exit 0
It's only when I restart the service does the new cert become active...
The batch seems to work as I get the email. |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Thu 08 Dec '22 20:42 Post subject: |
|
|
I have in httpd.conf :
MDNotifyCmd D:/servers/apache/bin/MDNotifyCmd.bat
And in /bin MDNotifyCmd.bat :
Net stop Apache
ping 127.0.0.1 -n 10 -w 1000 > nul
Net start Apache |
|
Back to top |
|
|
|
|
|
|