mirror of
https://github.com/searxng/searxng.git
synced 2024-11-20 03:10:10 +01:00
Merge pull request #1623 from ypid/fix/nginx-subdir-hosting
Fix Nginx subdir URL install docs which allowed download of settings.yml
This commit is contained in:
commit
2a7855854b
@ -114,6 +114,9 @@ content:
|
|||||||
# Module to import
|
# Module to import
|
||||||
module = searx.webapp
|
module = searx.webapp
|
||||||
|
|
||||||
|
# Support running the module from a webserver subdirectory.
|
||||||
|
route-run = fixpathinfo:
|
||||||
|
|
||||||
# Virtualenv and python path
|
# Virtualenv and python path
|
||||||
virtualenv = /usr/local/searx/searx-ve/
|
virtualenv = /usr/local/searx/searx-ve/
|
||||||
pythonpath = /usr/local/searx/
|
pythonpath = /usr/local/searx/
|
||||||
@ -151,7 +154,10 @@ content:
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name searx.example.com;
|
server_name searx.example.com;
|
||||||
root /usr/local/searx;
|
root /usr/local/searx/searx;
|
||||||
|
|
||||||
|
location /static {
|
||||||
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
include uwsgi_params;
|
include uwsgi_params;
|
||||||
@ -180,14 +186,13 @@ Add this configuration in the server config file
|
|||||||
|
|
||||||
.. code:: nginx
|
.. code:: nginx
|
||||||
|
|
||||||
location = /searx { rewrite ^ /searx/; }
|
location /searx/static {
|
||||||
location /searx {
|
alias /usr/local/searx/searx/static;
|
||||||
try_files $uri @searx;
|
|
||||||
}
|
}
|
||||||
location @searx {
|
|
||||||
|
location /searx {
|
||||||
uwsgi_param SCRIPT_NAME /searx;
|
uwsgi_param SCRIPT_NAME /searx;
|
||||||
include uwsgi_params;
|
include uwsgi_params;
|
||||||
uwsgi_modifier1 30;
|
|
||||||
uwsgi_pass unix:/run/uwsgi/app/searx/socket;
|
uwsgi_pass unix:/run/uwsgi/app/searx/socket;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,6 +202,10 @@ in case of single-user or low-traffic instances.)
|
|||||||
|
|
||||||
.. code:: nginx
|
.. code:: nginx
|
||||||
|
|
||||||
|
location /searx/static {
|
||||||
|
alias /usr/local/searx/searx/static;
|
||||||
|
}
|
||||||
|
|
||||||
location /searx {
|
location /searx {
|
||||||
proxy_pass http://127.0.0.1:8888;
|
proxy_pass http://127.0.0.1:8888;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
@ -338,4 +347,3 @@ References
|
|||||||
|
|
||||||
* How to: `Setup searx in a couple of hours with a free SSL certificate
|
* How to: `Setup searx in a couple of hours with a free SSL certificate
|
||||||
<https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__
|
<https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user