mirror of
https://github.com/wmnnd/nginx-certbot
synced 2023-04-20 18:47:46 +08:00
27 lines
576 B
Plaintext
27 lines
576 B
Plaintext
server {
|
|
listen 80;
|
|
server_name example.org;
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/certbot;
|
|
}
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name example.org;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/example.org/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/example.org/privkey.pem;
|
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
|
|
|
location / {
|
|
proxy_pass http://example.org;
|
|
}
|
|
}
|