Blog Archives

HTPP -> HTTP redirect on Glassfish 3.1.2.2

Execute this on your Glassfish machine:

###
### HttpToHttpsRedirectOnDifferentPort
###
asadmin create-protocol --securityenabled=false http-redirect
asadmin create-http-redirect --redirect-port 443 --secure-redirect true http-redirect
asadmin create-protocol --securityenabled=false http-redirect-base
asadmin create-protocol-finder --protocol http-redirect-base --target-protocol http-listener-2 --classname com.sun.grizzly.config.HttpProtocolFinder https-finder
asadmin create-protocol-finder --protocol http-redirect-base --target-protocol http-redirect --classname com.sun.grizzly.config.HttpProtocolFinder http-redirect
asadmin set configs.config.server-config.network-config.network-listeners.network-listener.http-listener-1.protocol=http-redirect-base

SSL certificates for namebased virtual hosts

I have read a post on Waffel’s Blog how you can setup a certificate for multiple namebased servers on Apache. It is simple to manage within Eisfair.

  • Choose “Service Administration” -> “Certs service” and select “Manage certificates”.
  • Now enter “1” for key type and choose your webserver.
  • Select “11” to create a new certificate request. The request will be stored to /usr/local/ssl/csr/apache.csr.
  • Open another terminal and switch to /usr/local/ssl
  • Create an extension file extension.txt using vi, as described in Waffel’s blog and enter your server names at the end.
  • Execute openssl x509 -req -days 365 -in apache.csr -signkey private/apache.key -out newcerts/apache.crt -extfile extension.txt -extensions mydomain_http
  • Select “14” (Manage certificates) to create a .pem file from the new certificate.
  • Use apache as SSL_CERT_NAME on the Apache configuration for every virtual server which you have included into extension.txt