Browse Source

add reverse proxy configuration

Noemi Vanyi 8 years ago
parent
commit
62cb89d669

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

171
     location = /searx { rewrite ^ /searx/; }
171
     location = /searx { rewrite ^ /searx/; }
172
     location /searx {
172
     location /searx {
173
             try_files $uri @searx;
173
             try_files $uri @searx;
174
-            proxy_pass http://localhost:9999/;
175
-            proxy_set_header X-Script-Name /searx;
176
     }
174
     }
177
     location @searx {
175
     location @searx {
178
             uwsgi_param SCRIPT_NAME /searx;
176
             uwsgi_param SCRIPT_NAME /searx;
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
 Enable base\_url in searx/settings.yml
200
 Enable base\_url in searx/settings.yml
186
 
201
 
187
 ::
202
 ::

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

190
 <div class="code nginx highlight-default"><div class="highlight"><pre>location = /searx { rewrite ^ /searx/; }
190
 <div class="code nginx highlight-default"><div class="highlight"><pre>location = /searx { rewrite ^ /searx/; }
191
 location /searx {
191
 location /searx {
192
         try_files $uri @searx;
192
         try_files $uri @searx;
193
-        proxy_pass http://localhost:9999/;
194
-        proxy_set_header X-Script-Name /searx;
195
 }
193
 }
196
 location @searx {
194
 location @searx {
197
         uwsgi_param SCRIPT_NAME /searx;
195
         uwsgi_param SCRIPT_NAME /searx;
201
 }
199
 }
202
 </pre></div>
200
 </pre></div>
203
 </div>
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
 <p>Enable base_url in searx/settings.yml</p>
215
 <p>Enable base_url in searx/settings.yml</p>
205
 <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>
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
 </pre></div>
217
 </pre></div>

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

171
     location = /searx { rewrite ^ /searx/; }
171
     location = /searx { rewrite ^ /searx/; }
172
     location /searx {
172
     location /searx {
173
             try_files $uri @searx;
173
             try_files $uri @searx;
174
-            proxy_pass http://localhost:9999/;
175
-            proxy_set_header X-Script-Name /searx;
176
     }
174
     }
177
     location @searx {
175
     location @searx {
178
             uwsgi_param SCRIPT_NAME /searx;
176
             uwsgi_param SCRIPT_NAME /searx;
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
 Enable base\_url in searx/settings.yml
200
 Enable base\_url in searx/settings.yml
186
 
201
 
187
 ::
202
 ::