mirror of
https://github.com/archlinux/aur.git
synced 2025-12-10 08:05:42 +01:00
39 lines
1 KiB
Text
39 lines
1 KiB
Text
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name searxng.example.com;
|
|
return 301 https://$server_name$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
http2 on;
|
|
server_name searxng.example.com;
|
|
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
|
|
|
|
access_log /var/log/nginx/searxng.example.com/access.log combined_ssl;
|
|
error_log /var/log/nginx/searxng.example.com/error.log;
|
|
|
|
location /static/ {
|
|
alias /var/lib/searxng/.venv/lib/python3.13/site-packages/searx/static;
|
|
}
|
|
|
|
location / {
|
|
uwsgi_pass unix:/run/uwsgi/searxng.sock;
|
|
|
|
include uwsgi_params;
|
|
|
|
uwsgi_param HTTP_HOST $host;
|
|
uwsgi_param HTTP_CONNECTION $http_connection;
|
|
|
|
# see flaskfix.py
|
|
uwsgi_param HTTP_X_FORWARDED_PROTO $scheme;
|
|
uwsgi_param HTTP_X_SCRIPT_NAME /searxng;
|
|
|
|
# see botdetection/trusted_proxies.py
|
|
uwsgi_param HTTP_X_REAL_IP $remote_addr;
|
|
uwsgi_param HTTP_X_FORWARDED_FOR $proxy_add_x_forwarded_for;
|
|
}
|
|
}
|