26 lines
719 B
Plaintext
26 lines
719 B
Plaintext
# ============================================================
|
|
# example.com - Main landing page (HTTPS)
|
|
# ============================================================
|
|
server {
|
|
listen 443 ssl;
|
|
server_name example.com www.example.com;
|
|
|
|
ssl_certificate /etc/ssl/certs/example.com.pem;
|
|
ssl_certificate_key /etc/ssl/private/example.com.key;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
|
|
|
root /var/www/example.com;
|
|
index index.html index.htm;
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
}
|
|
|
|
# HTTP -> HTTPS redirect for example.com
|
|
server {
|
|
listen 80;
|
|
server_name example.com www.example.com;
|
|
return 301 https://$host$request_uri;
|
|
} |