ca downloader

This commit is contained in:
Patrick 2024-11-22 17:10:01 +01:00
parent 7f02f28ae5
commit afd270b249
3 changed files with 32 additions and 0 deletions

9
data/default.conf Normal file
View file

@ -0,0 +1,9 @@
server {
listen 80;
server_name _;
location / {
root /var/www/html;
index index.html;
}
}

17
data/index.html Normal file
View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>VM Experiments</title>
</head>
<body>
<h1>Welcome to VM Experiments!</h1>
<p>Below you can download the required Certificate Authority.</p>
<p>You can import it on Firefox and in your operating system.</p>
<a href="ca.crt">Download Here!</a>
</body>
</html>

View file

@ -5,3 +5,9 @@ sudo openssl req -x509 -new -nodes -key /root/ca.key -sha256 -days 1024 -out /ro
sudo cp /root/ca.crt /usr/local/share/ca-certificates/ sudo cp /root/ca.crt /usr/local/share/ca-certificates/
sudo cp /root/ca.crt /etc/ssl/certs/ sudo cp /root/ca.crt /etc/ssl/certs/
sudo update-ca-certificates sudo update-ca-certificates
sudo mkdir -p /var/www/html
sudo cp ../data/index.html /var/www/html/
sudo cp /root/ca.crt /var/www/html/
sudo cp ../data/default.conf /etc/nginx/sites-available/default
sudo systemctl restart nginx