ansible-ffrgb/roles/searxng/templates/vhost.j2

38 lines
797 B
Plaintext
Raw Normal View History

2024-11-14 18:24:43 +01:00
server {
listen 80;
listen [::]:80;
server_name {{ searxng_domains }};
location /.well-known/acme-challenge {
default_type "text/plain";
alias /var/www/acme-challenge;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name {{ searxng_domains }};
ssl_certificate_key /etc/nginx/ssl/{{ searxng_domain }}.key;
ssl_certificate /etc/nginx/ssl/{{ searxng_domain }}.crt;
# set max upload size
client_max_body_size 8M;
location / {
proxy_pass http://localhost:8000;
proxy_set_header Connection $http_connection;
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 $scheme;
}
}