Setup apache2 with ssl on ubuntu

First of all we should install apache web server and add mod_ssl sudo apt-get install apache2 sudo a2enmod ssl Create folder for storing ssl certificates sudo mkdir /etc/apache2/ssl Now we generate self signed certificate for one year sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/server.key -out /etc/apache2/ssl/server.crt This command will ask you […]

setup apache+ssl on centos

yum install mod_ssl openssl # Generate private key openssl genrsa -out ca.key 1024 # Generate CSR openssl req -new -key ca.key -out ca.csr # Generate Self Signed Key openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt # Copy the files to the correct locations cp ca.crt /etc/pki/tls/certs cp ca.key /etc/pki/tls/private/ca.key cp ca.csr […]