Wow ! u know so many things, but the simple pkgadd command..! "I need to install apache, openssl, db-4.2, expat,gdbm,libiconv,libxml2 and zlib."
1. add all d packages u mentioned with pkgadd, nothing more than that.
2. Not necessary to uninstall the existing apache as its on different path...