Configure the OS X Server from .pkg postinstall script
The automating of server.app components is quite trivial since you can use serveradmin to do the heavy lifting.

  sudo serveradmin start web;


Asking a service to start if it's already running is harmless/idempotent.

To fork between the Apache configured by the Server.app and the "normal state" do the following:

if serverinfo -q --software; then
   cp product.conf /Library/Server/Web/Config/apache2/other
   serveradmin stop web
   serveradmin start web
else
   cp product.conf /etc/apache2/other
   launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist
   apachectl stop #if already started
   apachectl start
fi