Appunti Tomcat + Apache + SSL + mod_proxy
Generazione del Cetificato per Apache (ssl.bat)
@echo off
openssl req -config ..\conf\openssl.cnf -new -out server.csr
rem Removes pass-phrase from private key (privkey.pem), creating server.key.
openssl rsa -in privkey.pem -out server.key
rem Creates a self-signed certificate, server.crt (public key, also known as the 'Certificate').
openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 365
rem Create the default location of public key file server.crt, as specified under ssl.conf.
rem mkdir ..\conf\ssl.crt
rem Create the default location of private key server.key, as specified under ssl.conf.
rem mkdir ..\conf\ssl.key
rem Move public and private keys to the proper location.
rem move server.crt ..\conf\ssl.crt
rem move server.key ..\conf\ssl.key
move server.crt ..\conf\
move server.key ..\conf\
rem Delete file '.rnd' which contains entropy information and could be used to re-create keys.
del .rnd
rem Keep server.csr if you plan on self-signing more keys and you want the authority to match up exactly, otherwise, delete it and the old public key with the passphrase authentication.
del privkey.pem
del server.csr
pause
Commenti