Advertisement
CRK1918

SearXNG Nginx Site Setting

Oct 16th, 2022 (edited)
3,293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.04 KB | Software | 0 0
  1. server {
  2.  
  3.     # Listens on http
  4.     listen 80;
  5.     listen [::]:80;
  6.  
  7.     # Your server name
  8.     server_name searx.example.com ;
  9.  
  10.    
  11.     access_log /dev/null;
  12.     error_log  /dev/null;
  13.  
  14.     # X-Frame-Options (XFO) header set to DENY
  15.     add_header X-Frame-Options "DENY";
  16.  
  17.     # HTTP Strict Transport Security (HSTS) header
  18.     add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
  19.  
  20.     # Content Security Policy (CSP)
  21.     add_header Content-Security-Policy "default-src 'self';";
  22.  
  23.     location / {
  24.         uwsgi_pass unix:///usr/local/searxng/run/socket;
  25.  
  26.         include uwsgi_params;
  27.  
  28.         uwsgi_param    HTTP_HOST             $host;
  29.         uwsgi_param    HTTP_CONNECTION       $http_connection;
  30.  
  31.         # see flaskfix.py
  32.         uwsgi_param    HTTP_X_SCHEME         $scheme;
  33.         #uwsgi_param    HTTP_X_SCRIPT_NAME    /searxng;
  34.  
  35.         # see limiter.py
  36.         uwsgi_param    HTTP_X_REAL_IP        $remote_addr;
  37.         uwsgi_param    HTTP_X_FORWARDED_FOR  $proxy_add_x_forwarded_for;
  38.  
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement