{"id":3019,"date":"2018-03-20T19:21:04","date_gmt":"2018-03-20T15:51:04","guid":{"rendered":"http:\/\/www.serveridol.com\/?p=3011"},"modified":"2018-03-20T19:21:04","modified_gmt":"2018-03-20T15:51:04","slug":"how-to-delete-the-pu-protocol-from-glassfish-3","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/how-to-delete-the-pu-protocol-from-glassfish-3\/","title":{"rendered":"How to delete the PU protocol from Glassfish 3"},"content":{"rendered":"<p dir=\"ltr\" style=\"text-align: left;\">I have created PU protocol on Glassfish server in order to serving SSL pages forcefully. The main issue is this is the only way to redirect all the non-http requests to https. I did not find any other option for \u2018SSL forcing\u2019 in Glassfish 3 version. But here I want to get the same domain.xml file without having the PU ( <strong>port unification<\/strong>) protocal enabled. Becasue we enabled many other customer variables on domain.xml and wanted to move all the ssl parts under the loadbalencer (<strong>ssl offloading<\/strong>)<\/p>\n<p dir=\"ltr\" style=\"text-align: left;\"><strong>1. How to create PU protocol to use force https<\/strong><\/p>\n<div class=\"codecolorer-container text vibrant\" dir=\"ltr\" style=\"overflow: auto; white-space: nowrap; border: 1px solid #9f9f9f; width: 435px; text-align: left;\">\n<div class=\"text codecolorer\" style=\"padding: 5px; font: normal 12px\/1.4em Monaco, Lucida Console, monospace; white-space: nowrap;\">[root@web03 ~]# cd \/var\/glassfish\/domains\/domain1\/config<br \/>\n[root@web03 ~]#\/home\/glassfish\/bin\/asadmin create-protocol &#8211;securityenabled=false http-redirect<br \/>\n[root@web03 ~]#\/home\/glassfish\/bin\/asadmin create-protocol-filter &#8211;protocol http-redirect &#8211;classname com.sun.grizzly.config.HttpRedirectFilter redirect-filter<br \/>\n[root@web03 ~]#\/home\/glassfish\/bin\/asadmin create-protocol &#8211;securityenabled=false pu-protocol<br \/>\n[root@web03 ~]#\/home\/glassfish\/bin\/asadmin create-protocol-finder &#8211;protocol pu-protocol &#8211;targetprotocol http-listener-2 &#8211;classname com.sun.grizzly.config.HttpProtocolFinder http-finder<br \/>\n[root@web03 ~]#\/home\/glassfish\/bin\/asadmin create-protocol-finder &#8211;protocol pu-protocol &#8211;targetprotocol http-redirect &#8211;classname com.sun.grizzly.config.HttpProtocolFinder http-redirect<br \/>\n[root@web03 ~]#\/home\/glassfish\/bin\/asadmin set configs.config.server-config.network-config.network-listeners.network-listener.http-listener-1.protocol=pu-protocol\u200b<\/div>\n<\/div>\n<p dir=\"ltr\" style=\"text-align: left;\"><strong>Here is the reverse process of the activities remove PU protocol <\/strong><\/p>\n<p dir=\"ltr\" style=\"text-align: left;\">1. Assuming that Glassfish is installed on (<strong>\/home\/glassfish\/bin<\/strong>) folder and execute the below commands.<\/p>\n<div class=\"codecolorer-container text vibrant\" dir=\"ltr\" style=\"overflow: auto; white-space: nowrap; border: 1px solid #9f9f9f; width: 435px; text-align: left;\">\n<div class=\"text codecolorer\" style=\"padding: 5px; font: normal 12px\/1.4em Monaco, Lucida Console, monospace; white-space: nowrap;\">#\/var\/glassfish\/bin\/asadmin set \u00a0configs.config.server-config.network-config.network-listeners.network-listener.http-listener-1.protocol=http-listener-1<br \/>\n#\/var\/glassfish\/bin\/asadmin delete-protocol-finder \u00a0&#8211;protocol pu-protocol \u00a0 \u00a0http-redirect<br \/>\n#\/var\/glassfish\/bin\/asadmin delete-protocol-filter &#8211;protocol http-redirect redirect-filter<br \/>\n#\/var\/glassfish\/bin\/asadmin delete-protocol \u00a0pu-protocol<br \/>\n#\/var\/glassfish\/bin\/asadmin delete-protocol http-redirect<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I have created PU protocol on Glassfish server in order to serving SSL pages forcefully. The main issue is this is the only way to redirect all the non-http requests to https. I did not find any other option for \u2018SSL forcing\u2019 in Glassfish 3 version. But here I want to get the same domain.xml &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34,36],"tags":[],"class_list":["post-3019","post","type-post","status-publish","format-standard","hentry","category-server","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/3019","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=3019"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/3019\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=3019"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=3019"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=3019"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}