echo"Then, request a certificate for this subordinate CA (inter.csr)"
openssl genrsa -out client.key 1024
openssl req -new-key /vagrant/cert/inter.key -out /vagrant/cert/inter.csr -subj'/CN=www.mydom.com/O=My Company Name LTD./C=US'
openssl req -new-key client.key -out client.csr
openssl ca -in client.csr -out client.cer
echo"process the request for the subordinate CA certificate and get it signed by the root CA (inter.crt)"
echo"for error "Error self signed certificate getting chain." see http://stackoverflow.com/questions/23156911/wso2-enterprise-mobility-manager-error-self-signed-certificate-getting-chain#answer-23158993"
echo"import rootca.key in your browser ... do you know that you truster all these CA?"
echo"browse https://0.0.0.0:8443/ -> cert doesn't match domain name in url"
echo"you can fake www.mydom.com in our local resolver"
echo"type \"sudo cat '0.0.0.0 www.mydom.com' > /etc/hosts\" on your local machine"
echo"browse https://www.mydom.com:8443/ \o/"
echo"browse https://0.0.0.0:8443/ssl/?host=127.0.0.1&port=&csr=&s= -> Validating certificate chain failed. Probably non-trusted root/self signed certificate, or the chain order is wrong."
# OPTIONAL
# OPTIONAL
# STEP 9 - nginx as reverse proxy / http router - nginx front serve listen 80
# STEP 9 - nginx as reverse proxy / http router - nginx front serve listen 80