68 lines
1.7 KiB
Text
Executable file
68 lines
1.7 KiB
Text
Executable file
server {
|
|
access_log /dev/null;
|
|
error_log /dev/null;
|
|
|
|
server_name search.zzls.xyz;
|
|
include configs/general.conf;
|
|
include configs/securityheaders.conf;
|
|
|
|
|
|
if ($server_protocol ~* "HTTP/1.0") {
|
|
return 444;
|
|
}
|
|
if ($http_user_agent ~* (python) ) {
|
|
return 403;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:8888/;
|
|
#
|
|
proxy_http_version 1.1;
|
|
proxy_cache_bypass $http_upgrade;
|
|
|
|
# Proxy headers for the Limiter
|
|
proxy_set_header Host $host;
|
|
proxy_set_header Connection $http_connection;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Scheme $scheme;
|
|
}
|
|
|
|
location /searx/static/ {
|
|
alias /usr/local/searx/searx-src/searx/static/;
|
|
}
|
|
|
|
# Onion Service Header
|
|
add_header Onion-Location http://searxdr3pqz4nydgnqocsia2xbywptxbkympa2emn7zlgggrir4bkfad.onion$request_uri;
|
|
|
|
# QUIC
|
|
add_header Alt-Svc 'h3=":443"; ma=86400';
|
|
|
|
quic_retry on;
|
|
quic_gso on;
|
|
ssl_early_data on;
|
|
ssl_session_ticket_key /etc/nginx/http3key.key;
|
|
|
|
listen 443 http3;
|
|
listen 443 ssl http2; # managed by Certbot
|
|
ssl_certificate /etc/letsencrypt/live/search.zzls.xyz/fullchain.pem; # managed by Certbot
|
|
ssl_certificate_key /etc/letsencrypt/live/search.zzls.xyz/privkey.pem; # managed by Certbot
|
|
#include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
|
|
|
|
|
|
|
}
|
|
|
|
server {
|
|
if ($host = search.zzls.xyz) {
|
|
return 301 https://$host$request_uri;
|
|
} # managed by Certbot
|
|
|
|
|
|
listen 80;
|
|
|
|
server_name search.zzls.xyz;
|
|
return 404; # managed by Certbot
|
|
|
|
|
|
}
|