Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation on Caddyserver/Reverse Proxy #85

Open
Error00101 opened this issue Oct 10, 2022 · 3 comments
Open

Documentation on Caddyserver/Reverse Proxy #85

Error00101 opened this issue Oct 10, 2022 · 3 comments
Labels
question Further information is requested

Comments

@Error00101
Copy link

Hello,

I realy like the Project. I have made my personal instance via Docker and I think it is great!
A thing that bothered me was the reverse proxy setup for HTTPS/SSL.
I first wanted to make it work via caddy (as it is included in the package) -
after some time i found the topic that i searched for but at that time i decided to use nginX (as it is more convinient for me to set up)

  • Yes i overlooked the button that says docks on the website for Caddy.
  • But there is no link to the Caddy-docks from the searXNG-docks either.

How did you install SearXNG?
Docker - RaspberryPi 4 (8GB)

What happened?
Relativly hard to find documentation for Caddy.

How To Reproduce

Expected behavior
Finding a brief explanation on what a "reverse proxy" is and how to use caddy, (simmilar to nginX and Apache)
with a link to the Caddy Documentation

Screenshots & Logs
'-

Additional context
People new to the project will more likely use caddy and complain less if they find the documentation easier

Thank you very much!

@dalf
Copy link
Member

dalf commented Oct 11, 2022

In docker-compose.yml, the docker container searxng/searxng listen on the port 8080.

With NGINX, you can use this section of the documentation: https://docs.searxng.org/admin/installation-nginx.html#nginx-s-searxng-site
In the documentation you can see the path is /searxng, feel free to change it. Here without /searxng:

location / {
    proxy_pass http://127.0.0.1:8080;  # 127.0.0.1 or wherever is SearxNG

    proxy_set_header   Host             $host;
    proxy_set_header   Connection       $http_connection;

    # see flaskfix.py
    proxy_set_header   X-Scheme         $scheme;
    proxy_set_header   X-Script-Name    /;

    # see limiter.py
    proxy_set_header   X-Real-IP        $remote_addr;
    proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;

    # proxy_buffering  off;
    # proxy_request_buffering off;
    # proxy_buffer_size 8k;

}

You most probably want to have a HTTPS connection, so you can embed the above section in a server section: https://ssl-config.mozilla.org/#server=nginx&version=1.17.7&config=intermediate&openssl=1.1.1k&guideline=5.6

@Error00101
Copy link
Author

Thanks for the response!
Yep this is what i was using instead of Caddy. (these are even the same resources)
I still would suggest to add a Section in the Index for Caddy on how to configure it.

@y0nei
Copy link

y0nei commented Oct 28, 2022

what about all the headers that caddyfile sets? i have those in mine and i get issues on other locations like /static
#93

@unixfox unixfox added the question Further information is requested label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants