This will do the trick:
How do I install a root certificate?
Also these explanations are about a self-signing certificate and not about a CA (certificate Authority)on a server Apache!
To install openssl:
apt-get install openssl
To generate the private key:
openssl genrsa -aes256 -out certificat.key 4096
We rename the key :
mv certificat.key certificat.key.lock
Then generate our unlocked certificate:
openssl rsa -in certificat.key.lock -out certificat.key
Private key unlocked : certificat.key
Locked private key : certificat.key.lock
Generation of the signature request file:
openssl req -new -key certificat.key.lock -out certificat.csr
To auto-sign your certificate:
openssl x509 -req -days 365 -in certificat.csr -signkey certificat.key.lock -out certificat.crt
With Apache:
a2enmod ssl
/etc/apache2/site-availables/tuto.conf
<VirtualHost *:80>
ServerName tuto.myaddrsite.com
# Redirect HTTP port to HTTPS port
Redirect / https://www.myaddrsite.com
</VirtualHost>
<VirtualHost *:443>
ServerName tuto.myaddrsite.com
DocumentRoot /var/www/tuto
SSLEngine on
SSLCertificateFile /etc/ssl/www/certificat.crt
SSLCertificateKeyFile /etc/ssl/www/certificat.key
SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES
</VirtualHost>
To activate vHost :
a2ensite tuto.conf
service apache2 restart
After that, I don't know how to proceed with Angular.
My description is for Apache, but you always could find some interesting descritption by simple search on your browser. Or maybe somebody will coming to complete my description :)