-
Notifications
You must be signed in to change notification settings - Fork 0
/
searxng-custom.conf
58 lines (41 loc) · 1.7 KB
/
searxng-custom.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Redirects all HTTP traffic to HTTPS
server {
if ($host = searx.example.com) {
return 301 https://$host$request_uri;
}
listen 80;
listen [::]:80;
server_name searx.example.com;
return 404;
}
server {
listen 443 ssl;
listen [::]:443 ssl ipv6only=on;
# Your server name
server_name searx.example.com;
# Certbot SSL Certificates
ssl_certificate /etc/letsencrypt/live/searx.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/searx.example.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
# If you want to log user activity, comment these
access_log /dev/null;
error_log /dev/null;
# Security and Privacy https://owasp.org/www-project-secure-headers/
add_header X-Frame-Options DENY;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;" always;
add_header X-Content-Type-Options: nosniff;
add_header Referrer-Policy: same-origin;
location / {
uwsgi_pass unix:///usr/local/searxng/run/socket;
include uwsgi_params;
uwsgi_param HTTP_HOST $host;
uwsgi_param HTTP_CONNECTION $http_connection;
# see flaskfix.py
uwsgi_param HTTP_X_SCHEME $scheme;
uwsgi_param HTTP_X_SCRIPT_NAME /searxng;
# see limiter.py
uwsgi_param HTTP_X_REAL_IP $remote_addr;
uwsgi_param HTTP_X_FORWARDED_FOR $proxy_add_x_forwarded_for;
}
}