shiloh_automatisch/https/nginx/secondary_automatisch_letsencrypt_nginx.conf
Linden Crandall bb979ac003
Some checks are pending
Automatisch Backend Tests / test (push) Waiting to run
Automatisch CI / linter (push) Waiting to run
Automatisch CI / start-backend-server (push) Waiting to run
Automatisch CI / start-backend-worker (push) Waiting to run
Automatisch CI / build-web (push) Waiting to run
Automatisch UI Tests / test (push) Waiting to run
ports 443 and 80 conflict fix
2025-02-08 04:59:36 +09:00

47 lines
1.2 KiB
Plaintext

# nginx conf file to use after LetsEncrypt SSL certs have been created
# replace <HOSTNAME> with your DNS i.e.automatisch.lasthourhosting.org
events {
worker_connections 1024;
}
http {
server {
listen 7757;
listen [::]:7757;
server_name <HOSTNAME>;
location ~ /.well-known/acme-challenge/ {
root /var/www/certbot;
}
return 301 https://$host$request_uri;
}
server {
listen 7757 ssl http2;
listen [::]:7757 ssl http2;
# use ssl letsencrypt certs
ssl_certificate /etc/letsencrypt/live/<HOSTNAME>/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/<HOSTNAME>/privkey.pem;
server_name <HOSTNAME>;
location / {
proxy_pass http://<HOSTNAME>:7757/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
location ~ /.well-known/acme-challenge/ {
root /var/www/certbot;
}
}
}