26 lines
586 B
Plaintext
26 lines
586 B
Plaintext
server {
|
|
listen 80;
|
|
listen 443 ssl;
|
|
server_name proxy.sggai.site;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/proxy.sggai.site/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/proxy.sggai.site/privkey.pem;
|
|
|
|
root /var/www/proxy.sggai.site;
|
|
index index.html;
|
|
|
|
location ^~ /.well-known/acme-challenge/ {
|
|
root /var/www;
|
|
default_type text/plain;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location / {
|
|
if ($scheme = http) {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
}
|