Sfoglia il codice sorgente

add reverse proxy configuration

Noemi Vanyi 8 anni fa
parent
commit
62cb89d669

+ 17
- 2
_sources/dev/install/installation.txt Vedi File

@@ -171,8 +171,6 @@ Add this configuration in the server config file
171 171
     location = /searx { rewrite ^ /searx/; }
172 172
     location /searx {
173 173
             try_files $uri @searx;
174
-            proxy_pass http://localhost:9999/;
175
-            proxy_set_header X-Script-Name /searx;
176 174
     }
177 175
     location @searx {
178 176
             uwsgi_param SCRIPT_NAME /searx;
@@ -182,6 +180,23 @@ Add this configuration in the server config file
182 180
     }
183 181
 
184 182
 
183
+OR
184
+
185
+using reverse proxy
186
+(Please, note that reverse proxy advised to be used in case of single-user or low-traffic instances.)
187
+
188
+.. code:: nginx
189
+
190
+    location /searx {
191
+        proxy_pass http://127.0.0.1:8888;
192
+        proxy_set_header Host $host;
193
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
194
+        proxy_set_header X-Scheme $scheme;
195
+        proxy_set_header X-Script-Name /searx;
196
+        proxy_buffering off;
197
+    }
198
+
199
+
185 200
 Enable base\_url in searx/settings.yml
186 201
 
187 202
 ::

+ 13
- 2
dev/install/installation.html Vedi File

@@ -190,8 +190,6 @@ content:</p>
190 190
 <div class="code nginx highlight-default"><div class="highlight"><pre>location = /searx { rewrite ^ /searx/; }
191 191
 location /searx {
192 192
         try_files $uri @searx;
193
-        proxy_pass http://localhost:9999/;
194
-        proxy_set_header X-Script-Name /searx;
195 193
 }
196 194
 location @searx {
197 195
         uwsgi_param SCRIPT_NAME /searx;
@@ -201,6 +199,19 @@ location @searx {
201 199
 }
202 200
 </pre></div>
203 201
 </div>
202
+<p>OR</p>
203
+<p>using reverse proxy
204
+(Please, note that reverse proxy advised to be used in case of single-user or low-traffic instances.)</p>
205
+<div class="code nginx highlight-default"><div class="highlight"><pre>location /searx {
206
+    proxy_pass http://127.0.0.1:8888;
207
+    proxy_set_header Host $host;
208
+    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
209
+    proxy_set_header X-Scheme $scheme;
210
+    proxy_set_header X-Script-Name /searx;
211
+    proxy_buffering off;
212
+}
213
+</pre></div>
214
+</div>
204 215
 <p>Enable base_url in searx/settings.yml</p>
205 216
 <div class="highlight-default"><div class="highlight"><pre><span class="n">base_url</span> <span class="p">:</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">your</span><span class="o">.</span><span class="n">domain</span><span class="o">.</span><span class="n">tld</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span>
206 217
 </pre></div>

+ 17
- 2
docs/dev/install/installation.rst Vedi File

@@ -171,8 +171,6 @@ Add this configuration in the server config file
171 171
     location = /searx { rewrite ^ /searx/; }
172 172
     location /searx {
173 173
             try_files $uri @searx;
174
-            proxy_pass http://localhost:9999/;
175
-            proxy_set_header X-Script-Name /searx;
176 174
     }
177 175
     location @searx {
178 176
             uwsgi_param SCRIPT_NAME /searx;
@@ -182,6 +180,23 @@ Add this configuration in the server config file
182 180
     }
183 181
 
184 182
 
183
+OR
184
+
185
+using reverse proxy
186
+(Please, note that reverse proxy advised to be used in case of single-user or low-traffic instances.)
187
+
188
+.. code:: nginx
189
+
190
+    location /searx {
191
+        proxy_pass http://127.0.0.1:8888;
192
+        proxy_set_header Host $host;
193
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
194
+        proxy_set_header X-Scheme $scheme;
195
+        proxy_set_header X-Script-Name /searx;
196
+        proxy_buffering off;
197
+    }
198
+
199
+
185 200
 Enable base\_url in searx/settings.yml
186 201
 
187 202
 ::