{"id":6009,"date":"2016-07-13T10:03:02","date_gmt":"2016-07-13T02:03:02","guid":{"rendered":"http:\/\/rmohan.com\/?p=6009"},"modified":"2016-07-13T10:03:02","modified_gmt":"2016-07-13T02:03:02","slug":"apache-http-server-plugin-configuration-to-weblogic-11g-10-3-5","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6009","title":{"rendered":"Apache HTTP Server Plugin configuration to Weblogic 11g (10.3.5)"},"content":{"rendered":"<p>Apache HTTP Server Plugin configuration to Weblogic 11g (10.3.5)<\/p>\n<p>1. Install Apache HTTP server (Version 2.2.29).<\/p>\n<p>Note \u2013  Installation might need \u2018root\u2019<\/p>\n<p>Here is the Apache reference doc for Installation (http:\/\/httpd.apache.org\/docs\/2.2\/install.html)<\/p>\n<p>Download required version of Apache software distribution from nearest mirror site (Mirror I used)<\/p>\n<p>http:\/\/mirrors.sonic.net\/apache\/httpd\/httpd-2.2.29.tar.gz<\/p>\n<p>2. Configure<\/p>\n<p>.\/configure \u2013prefix=\/opt\/apache2.x \u2013with-ldap \u2013enable-mods-shared=\u201dall ssl ldap cache proxy authn_alias mem_cache file_cache authnz_ldap charset_lite dav_lock disk_cache isapi suexec\u201d \u2013enable-rewrite=shared \u2013enable-mime-magic \u2013enable-info \u2013enable-speling \u2013enable-usertrack \u2013enable-example \u2013enable-maintainer-mode<\/p>\n<p>3. make<\/p>\n<p>4. make install<\/p>\n<p>Note \u2013 When we re-run the Apache installation with updated modules, sometimes you may run into libtool error<\/p>\n<p>Error :<\/p>\n<p>libtool: install: error: cannot install `libaprutil-1.la&#8217; to a directory not<br \/>\n                         ending in \/usr\/local\/apache2\/lib<br \/>\nSolution :  run below command before \u2018make install\u2019<\/p>\n<p>make clean<\/p>\n<p>Issue#2 : you may run into below error while starting Apache instance after loaded weblogic shared Object files:<\/p>\n<p>[root@NA9F2RFV1 bin]# .\/apachectl -k start<\/p>\n<p>httpd: Syntax error on line 126 of \/opt\/thirdparty\/Middleware\/apache2.x\/conf\/httpd.conf: Cannot load \/opt\/thirdparty\/Middleware\/apache2.x\/modules\/mod_wl_22.so into server: libstdc++.so.5: cannot open shared object file: No such file or directory<br \/>\n[root@NA9F2RFV1 bin]# yum install libstdc++.sh.5<\/p>\n<p>Solution :<\/p>\n<p>Run below Command to install dependent libraries.<\/p>\n<p>sudo yum install compat-libstdc++-33.x86_64<\/p>\n<p>>Installing : compat-libstdc++-33-3.2.3-69.el6.x86_64 1\/1<br \/>\n>Verifying : compat-libstdc++-33-3.2.3-69.el6.x86_64 1\/1<\/p>\n<p>>Installed:<br \/>\n>compat-libstdc++-33.x86_64 0:3.2.3-69.el6<\/p>\n<p>Issue 3:<\/p>\n<p>you may see below error while restart Apache.<\/p>\n<p>[root@NA9F2RFV1 bin]# .\/apachectl -k stop<br \/>\nhttpd: Could not reliably determine the server\u2019s fully qualified domain name, using NA9F2RFV1.localdomain for ServerName<\/p>\n<p>Solution :<\/p>\n<p>you need to add \u2018hostname\u2019 to \/etc\/hosts file<\/p>\n<p>127.0.0.1 NA9F2RFV1.localdomain localhost localhost4 localhost4.localdomain4<br \/>\n::1 NA9F2RFV1.localdomain localhost localhost6 localhost6.localdomain6<\/p>\n<p>5. vi $APACHE_HOME\/conf\/httpd.conf<\/p>\n<p>a) Load weblogic module<\/p>\n<p>copy shared object file into $Apache_Home\/modules directory. choose the correct .so file based on the Apache version and OS (32 bit\/64 bit)<\/p>\n<p>you can copy these .so files from weblogic distribution ($WLS_HOME\/wlserver_10.3\/server\/plugin\/)<\/p>\n<p>         LoadModule weblogic_module modules\/mod_wl_22.so<\/p>\n<p>6. Define IF module for Weblogic<\/p>\n<p><IfModule mod_weblogic.c><\/p>\n<p>WebLogicHost 192.168.56.101<br \/>\nWebLogicPort 7001<br \/>\nMatchExpression \/console<br \/>\nMatchExpression *.jsp<br \/>\nMatchExpression *.html<br \/>\nConnectTimeoutSecs 10<br \/>\nConnectRetrySecs 2<br \/>\nWLIOTimeoutSecs 300<br \/>\nIdempotent ON<br \/>\nKeepAliveEnabled ON<br \/>\n#WLProxySSL ON\/OFF ( ON for opening apache to access SSL \u2013 via Https)<br \/>\nDebug ALL<br \/>\nWLLogFile \/opt\/apache2.x\/logs\/wl-proxy.log<br \/>\n<\/IfModule><\/p>\n<p>Configure SSL for Apache<\/p>\n<blockquote data-secret=\"M7AiCljuno\" class=\"wp-embedded-content\"><p><a href=\"http:\/\/www.thegeekstuff.com\/2011\/03\/install-apache2-ssl\/\">How To Install Apache 2 with SSL on Linux (with mod_ssl, openssl)<\/a><\/p><\/blockquote>\n<p><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"http:\/\/www.thegeekstuff.com\/2011\/03\/install-apache2-ssl\/embed\/#?secret=M7AiCljuno\" data-secret=\"M7AiCljuno\" width=\"600\" height=\"338\" title=\"Embedded WordPress Post\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<blockquote data-secret=\"E8CqruqFzP\" class=\"wp-embedded-content\"><p><a href=\"http:\/\/www.thegeekstuff.com\/2009\/07\/linux-apache-mod-ssl-generate-key-csr-crt-file\/\">How To Generate SSL Key, CSR and Self Signed Certificate For Apache<\/a><\/p><\/blockquote>\n<p><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"http:\/\/www.thegeekstuff.com\/2009\/07\/linux-apache-mod-ssl-generate-key-csr-crt-file\/embed\/#?secret=E8CqruqFzP\" data-secret=\"E8CqruqFzP\" width=\"600\" height=\"338\" title=\"Embedded WordPress Post\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>Note \u2013 After you generate certs and configure Apache to access over https, you may see below issue in browser.<\/p>\n<p>*******************************<br \/>\nBad Request<\/p>\n<p>Your browser sent a request that this server could not understand.<br \/>\nReason: You\u2019re speaking plain HTTP to an SSL-enabled server port.<br \/>\nInstead use the HTTPS scheme to access this URL, please.<br \/>\n*******************************<\/p>\n<p>To have HTTP (non-ssl working) between apache plugin and weblogic, you need to enable this option<\/p>\n<p>\u201cWebLogic Plug-In Enabled\u201d using weblogic console under Servers > AdminServer > General > Advanced.<\/p>\n<p>Configure SSL between Apache and Weblogic11g (Using Trusted CA)<\/p>\n<p>Web Logic Server Configuration<\/p>\n<p>1. Generate a private key<\/p>\n<p>jdk_home\\bin\\keytool -genkey -alias <your_alias_name> -keyalg RSA -keystore <your_keystore_filename><\/p>\n<p>Example:<\/p>\n<p>\/opt\/thirdparty\/Middleware\/Oracle\/jdk1.6.0_24\/bin\/keytool -genkey -alias sslcert -keyalg RSA -keysize 2048 -keystore mykeystore.jks<br \/>\nNote \u2013 use key size 2048, Sometimes it may complain based on new cryptography rules.<\/p>\n<p>2. Generate a certificate request (CSR file).<\/p>\n<p>jdk_home\\bin\\keytool -certreq -keyalg RSA -alias <your_alias_name> -file certreq.csr -keystore <your_keystore_filename><\/p>\n<p>Example:<\/p>\n<p>\/opt\/thirdparty\/Middleware\/Oracle\/jdk1.6.0_24\/bin\/keytool -certreq -keyalg RSA -alias sslcert -file certreq.csr -keystore mykeystore.jks<br \/>\n3. Get CSR signed by trusted Authority (Verisign in this case)<\/p>\n<p>Paste the csr file and get the trail certificate(save as public.pem) and intermediate CA (save as intermediate.pem) and Root CA (save as rootCA.pem) from the email sent from Verisign website( http:\/\/www.symantec.com\/ssl-certificates\/?inid=vrsn_symc_ssl_index&#038;searchdomain=google.com&#038;searchterms=<\/p>\n<p>4. Import Certificates into keystores:<\/p>\n<p>1. Import CA into keystore:<\/p>\n<p>keytool -import -alias verisignCA -file CA.pem -keystore <your_keystore_filename> -trustcacerts<\/p>\n<p>Example:<\/p>\n<p>\/opt\/thirdparty\/Middleware\/Oracle\/jdk1.6.0_24\/bin\/keytool -import -alias rootCA -file rootCA.pem -keystore mykeystore.jks \u2013trustcacerts<\/p>\n<p>2. Import intermediate CA into keystore:<\/p>\n<p>keytool -import -alias verisignIntermediateCA -file Intermediate.pem -keystore <your_keystore_filename> -trustcacerts<\/p>\n<p>Example:<\/p>\n<p>\/opt\/thirdparty\/Middleware\/Oracle\/jdk1.6.0_24\/bin\/keytool -import -alias intermediateCA -file intermediateCA.pem -keystore mykeystore.jks \u2013trustcacerts<\/p>\n<p>3. Import the public key into your keystore. It will go on the same alias as the private key:<\/p>\n<p>keytool -import -alias <your_alias_name> -file public.pem -keystore <your_keystore_filename> -trustcacerts<\/p>\n<p>Example:<\/p>\n<p>\/opt\/thirdparty\/Middleware\/Oracle\/jdk1.6.0_24\/bin\/keytool -import -alias localhost -file public.pem -keystore mykeystore.jks \u2013trustcacerts<\/p>\n<p>4. To view the keystore:<\/p>\n<p>keytool -list -keystore mykeystore.jks -v<\/p>\n<p>5. keystore configuration in weblogic console.<\/p>\n<p>From the Admin console, go to your server page, and in the Keystore &#038; SSL tab choose:<\/p>\n<p>Custom Identity and Custom Trust<\/p>\n<p>Custom Identity<br \/>\nCustom Identity Key Store File Name: <your_keystore_filename> ( Ex \u2013\/opt\/thirdparty\/Middleware\/Oracle\/certs\/myKeystore.jks)<\/p>\n<p>Custom Identity Key Store Type: jks<br \/>\nCustom Identity Key Store Pass Phrase: <your password><br \/>\nConfirm Custom Identity Key Store Pass Phrase: <your password><\/p>\n<p>Custom Trust<br \/>\nCustom Trust Key Store File Name: <your_keystore_filename> ( Ex \u2013\/opt\/thirdparty\/Middleware\/Oracle\/certs\/myKeystore.jks)<\/p>\n<p>Custom Trust Key Store Type: jks<\/p>\n<p>Custom Trust Key Store Pass Phrase: <your password><br \/>\nConfirm Custom Trust Key Store Pass Phrase: <your password><\/p>\n<p>Go to SSL TAB :<\/p>\n<p>Private Key Alias: <your_alias_name><br \/>\nPassphrase: password<br \/>\nConfirm Passphrase: password<\/p>\n<p>Restart your server and now try https:\/\/localhost:7002\/console<br \/>\nYou should see the following while server starts up:<br \/>\n<Aug 4, 2009 7:19:17 PM GMT+05:30> <Notice> <WebLogicServer> <BEA-000298><br \/>\n<Certificate expires in 14 days: [\n[\nVersion: V3\nSubject: CN=localhost, OU=Terms of use at http:\/\/www.verisign.com\/cps\/testca (c)05, OU=oracle,\nO=oracle, L=BANG, ST=KA, C=IN\nSignature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5\n\nKey: Sun RSA public key, 1024 bits\nmodulus:\n1005070948376358074374236852403785592182590705370591472921278852507162691666556315447504840297044217\n406796806\n8632923437196828010145594050195432044329126731123133367158479667242853741709746093197774813648593717\n91639176198708507422\n56868100626678565588940082002286028558797528920106552889565563824202336798115363\npublic exponent: 65537\nValidity: [From: Tue Aug 04 05:30:00 GMT+05:30 2009,\nTo: Wed Aug 19 05:29:59 GMT+05:30 2009]\nIssuer: CN=VeriSign Trial Secure Server CA \u2013 G2, OU=Terms of use at\nhttps:\/\/www.verisign.com\/cps\/testca (c)09, OU=\u201dFor\nTest Purposes Only. No assurances.\u201d, O=\u201dVeriSign, Inc.\u201d, C=US\nSerialNumber: [ 5f8db365 ede6fd4b fbd717f2 48b0804f]\n\nCertificate Extensions: 8\n[1]: ObjectId: 1.3.6.1.5.5.7.1.12 Criticality=false\nExtension unknown: DER encoded OCTET string =\n0000: 04 62 30 60 A1 5E A0 5C 30 5A 30 58 30 56 16 09 .b0`.^.Z0X0V..\n0010: 69 6D 61 67 65 2F 67 69 66 30 21 30 1F 30 07 06 image\/gif0!0.0..\n0020: 05 2B 0E 03 02 1A 04 14 4B 6B B9 28 96 06 0C BB .+\u2026\u2026Kk.(\u2026.\n0030: D0 52 38 9B 29 AC 4B 07 8B 21 05 18 30 26 16 24 .R8.).K..!..0&#038;.$\n0040: 68 74 74 70 3A 2F 2F 6C 6F 67 6F 2E 76 65 72 69 http:\/\/logo.veri\n0050: 73 69 67 6E 2E 63 6F 6D 2F 76 73 6C 6F 67 6F 31 sign.com\/vslogo1\n0060: 2E 67 69 66 .gif\n\n[2]: ObjectId: 2.5.29.35 Criticality=false\nAuthorityKeyIdentifier [\nKeyIdentifier [\n0000: 28 17 13 8A BD D6 A2 B5 DC 06 2C B7 B6 8E DA 10 (\u2026\u2026\u2026,\u2026..\n0010: 66 60 6E E5 f`n.\n]\n\n]\n\n[3]: ObjectId: 2.5.29.31 Criticality=false\nCRLDistributionPoints [\n[DistributionPoint:\n[URIName: http:\/\/SVRTrial-G2-crl.verisign.com\/SVRTrialG2.crl%5D\n]]\n\n[4]: ObjectId: 2.5.29.37 Criticality=false\nExtendedKeyUsages [\n[1.3.6.1.5.5.7.3.1, 1.3.6.1.5.5.7.3.2]]\n\n[5]: ObjectId: 2.5.29.32 Criticality=false\nCertificatePolicies [\n[CertificatePolicyId: [2.16.840.1.113733.1.7.21]\n\nClick the lock icon in the bottom right of the screen and view the certificate.\nGoto certification Path and select Root Certificate. View the certificate and copy to file MyWeblogicCAToTrust.cer in a particular location, say (\/opt\/thirdparty\/Middleware\/Oracle\/certs)\n\n6. Convert this .crt into .pem\n\nopenssl x509 -inform der -in MyWeblogicCAToTrust.cer -out MyWeblogicCAToTrust.pem\nApache Plugin Configuration:\n\nIn My httpd.conf file, Please have these parameters.\n\n<IfModule mod_weblogic.c><br \/>\nWebLogicHost 192.168.56.101<br \/>\nWebLogicPort 7002 (SSL Port)<br \/>\nMatchExpression \/console<br \/>\nMatchExpression *.jsp<br \/>\nMatchExpression *.html<br \/>\nConnectTimeoutSecs 10<br \/>\nConnectRetrySecs 2<br \/>\nWLIOTimeoutSecs 300<br \/>\nIdempotent OFF<br \/>\nKeepAliveEnabled ON<br \/>\n#WLProxySSL ON\/OFF ( ON for opening apache to access SSL \u2013 via Https)<br \/>\nSecureProxy ON<br \/>\nTrustedCAFile \/opt\/thirdparty\/Middleware\/Oracle\/certs\/MyWeblogicCAToTrust.pem<br \/>\nRequireSSLHostMatch false<br \/>\nEnforceBasicConstraints OFF<br \/>\nWLProxySSL ON<br \/>\nDebug ALL<br \/>\nWLLogFile logs\/wlproxy.log<br \/>\n<\/IfModule><\/p>\n<p>Error<\/p>\n<p>You might notice below error in Apache error log while accessing https: apache url<\/p>\n<p>[Wed Dec 10 13:55:26 2014] [error] [client 192.168.56.1] ap_proxy: trying GET \/console at backend host \u2018192.168.56.101\/7002; got exception \u2018WRITE_ERROR_TO_SERVER [os error=0, line 806 of ..\/nsapi\/URL.cpp]: \u2018<\/p>\n<p>Solution :<\/p>\n<p>Convert this .crt into .pem<\/p>\n<p>openssl x509 -inform der -in MyWeblogicCAToTrust.cer -out MyWeblogicCAToTrust.pem<br \/>\nNote :  Import the CA.pem for apache and weblogic in the browser using content-> certificate-> Import-> Autoselect store based on type of cert- option.<\/p>\n<p>Configuration Complete!!<\/p>\n<p>Apache-Weblogic SSL<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apache HTTP Server Plugin configuration to Weblogic 11g (10.3.5)<\/p>\n<p>1. Install Apache HTTP server (Version 2.2.29).<\/p>\n<p>Note \u2013 Installation might need \u2018root\u2019<\/p>\n<p>Here is the Apache reference doc for Installation (http:\/\/httpd.apache.org\/docs\/2.2\/install.html)<\/p>\n<p>Download required version of Apache software distribution from nearest mirror site (Mirror I used)<\/p>\n<p>http:\/\/mirrors.sonic.net\/apache\/httpd\/httpd-2.2.29.tar.gz<\/p>\n<p>2. Configure<\/p>\n<p>.\/configure \u2013prefix=\/opt\/apache2.x \u2013with-ldap \u2013enable-mods-shared=\u201dall ssl ldap cache [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[56],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6009"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6009"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6009\/revisions"}],"predecessor-version":[{"id":6010,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6009\/revisions\/6010"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6009"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6009"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6009"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}