37 lines
755 B
Plaintext
37 lines
755 B
Plaintext
server {
|
|
root /usr/share/nginx/html;
|
|
|
|
index index.html index.htm index.nginx-debian.html;
|
|
server_name _; # managed by Certbot
|
|
client_max_body_size 70M;
|
|
|
|
location /404 {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location / {
|
|
if ($host = quiz.pena.digital) {
|
|
proxy_pass http://squiz;
|
|
}
|
|
}
|
|
|
|
listen [::]:443 ssl ipv6only=on; # managed by Certbot
|
|
listen 443 ssl; # managed by Certbot
|
|
ssl_certificate /etc/nginx/certs/fullchain.pem; # managed by Certbot
|
|
ssl_certificate_key /etc/nginx/certs/privkey.pem; # managed by Certbot
|
|
|
|
}
|
|
server {
|
|
listen 80 ;
|
|
listen [::]:80 ;
|
|
server_name _;
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/certbot;
|
|
}
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|