GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — basic-cert-signer/setup_server.sh at master · hpware/basic-cert-signer

Expand file tree

/

setup_server.sh

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
28 lines (25 loc) · 1.13 KB
/

setup_server.sh

Copy path

File metadata and controls

28 lines (25 loc) · 1.13 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# these two are required.
ORG_NAME="Default CA generated by CS"
CN_NAME="Default CA generated by CS"
# create cert
mkdir -p /certs/created
openssl genrsa -out ./certs/master.key.pem 4096
openssl req -x509 -new -nodes -key ./certs/master.key.pem -sha512 -days 7305 -out ./certs/master.pub.pem -subj "/C=TW/L=Taipei/O=${ORG_NAME}/CN=${CN_NAME}"
# generate default cert for the default HTTPS port.
openssl genrsa -out ./certs/created/default.private_key.pem 4096
openssl req -new -key ./certs/created/default.private_key.pem -out ./certs/created/default.csr.pem -subj "/C=TW/L=Taipei/O=${ORG_NAME}/CN=test.default.tw"
openssl x509 -req -in ./certs/created/default.csr.pem -CA ./certs/master.pub.pem -CAkey ./certs/master.key.pem -CAcreateserial -out ./certs/created/default.pub.pem -days 7305 -sha512
cat ./certs/created/default.pub.pem ./certs/master.pub.pem > ./certs/default.fullchain.pem
# create Caddyfile
mkdir -p caddy/conf
tee ./caddy/conf/Caddyfile <<EOF
:80 {
root * /usr/share/caddy
file_server
}
:443 {
tls /certs/default.fullchain.pem /certs/default.private_key.pem
root * /usr/share/caddy
file_server
}
EOF
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.