logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS Twitter


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: mod_md MDNotifyCmd command
Author
sailor



Joined: 17 Apr 2015
Posts: 70
Location: US

PostPosted: Thu 08 Dec '22 19:07    Post subject: mod_md MDNotifyCmd command Reply with quote

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: 2989
Location: Hilversum, NL, EU

PostPosted: Thu 08 Dec '22 20:42    Post subject: Reply with quote

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


Reply to topic   Topic: mod_md MDNotifyCmd command View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules