---
# System prepended metadata

title: HTTPS migration
tags: [ccdc]

---

---
tags: ccdc
---

# HTTPS migration

## verify openssl installed
```bash=
openssl version
```

## generate certificate and key
```bash=
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/apache-selfsigned.key -out /etc/ssl/certs/apache-selfsigned.crt
```

## allow https for firewall
### iptables
```bash=
iptables -I INPUT -p tcp --dport 443 -j ACCEPT
```
### ufw
```bash=
ufw allow 443
```

## restart web server
example with apache:
```bash=
systemctl restart apache2
```

## verify everything works
connect in browser w/ https