Skip to content

Commit

Permalink
update frontend nginx.conf to allow certbot to renew SSL certificates…
Browse files Browse the repository at this point in the history
… using port 80
  • Loading branch information
lkeegan committed Jan 13, 2025
1 parent cbb3b12 commit 33e1c00
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion frontend/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,31 @@
server {
# allow certbot to renew SSL certificates using port 80
listen 80;
listen [::]:80;

server_name circuitseq.iwr.uni-heidelberg.de;
server_tokens off;

location /.well-known/acme-challenge/ {
root /var/www/certbot;
}

# forward anything else to https://circuitseq.iwr.uni-heidelberg.de
location / {
return 301 https://circuitseq.iwr.uni-heidelberg.de$request_uri;
}
}

server {
# redirect www.circuitseq.iwr.uni-heidelberg.de to circuitseq.iwr.uni-heidelberg.de
server_name www.circuitseq.iwr.uni-heidelberg.de;
return 301 $scheme://circuitseq.iwr.uni-heidelberg.de$request_uri;
}

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name www.circuitseq.iwr.uni-heidelberg.de circuitseq.iwr.uni-heidelberg.de localhost;
server_name www.circuitseq.iwr.uni-heidelberg.de circuitseq.iwr.uni-heidelberg.de;
ssl_certificate /sample_flow_ssl_cert.pem;
ssl_certificate_key /sample_flow_ssl_key.pem;

Expand Down

0 comments on commit 33e1c00

Please sign in to comment.