-
|
Hi, How do I configure nginx? The example is not a valid nginx configuration file. at the top and For installation I used the script (all default options). Now I get a |
Beta Was this translation helpful? Give feedback.
Answered by
mzch
Aug 16, 2023
Replies: 1 comment 3 replies
-
|
Sample nginx conf when SearXNG listens on port 8080: server {
listen 80;
listen [::]:80;
server_name searxng.example.com;
if ($host = searxng.example.com ) {
return 301 https://$host$request_uri;
}
return 404;
}
server {
listen 443 ssl; # managed by Certbot
listen [::]:443 ssl; # managed by Certbot
http2 on;
server_name searxng.example.com;
ssl_certificate /etc/letsencrypt/live/searxng.example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/searxng.example.com/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
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $http_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 https;
proxy_set_header X-Nginx-Proxy true;
}
access_log /var/log/nginx/searxng.example.coms.log;
error_log /var/log/nginx/searxng.example.com.error.log;
} |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
adevoss
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample nginx conf when SearXNG listens on port 8080: