瀏覽代碼

update install docs on reverse proxy

Noemi Vanyi 8 年之前
父節點
當前提交
356efb967f
共有 3 個檔案被更改,包括 85 行新增77 行删除
  1. 3
    0
      _sources/dev/install/installation.txt
  2. 79
    77
      dev/install/installation.html
  3. 3
    0
      docs/dev/install/installation.rst

+ 3
- 0
_sources/dev/install/installation.txt 查看文件

@@ -171,6 +171,8 @@ 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;
174 176
     }
175 177
     location @searx {
176 178
             uwsgi_param SCRIPT_NAME /searx;
@@ -179,6 +181,7 @@ Add this configuration in the server config file
179 181
             uwsgi_pass unix:/run/uwsgi/app/searx/socket;
180 182
     }
181 183
 
184
+
182 185
 Enable base\_url in searx/settings.yml
183 186
 
184 187
 ::

+ 79
- 77
dev/install/installation.html 查看文件

@@ -68,28 +68,28 @@ certificate</a></p>
68 68
 <h2><a class="toc-backref" href="#id3">Basic installation</a><a class="headerlink" href="#basic-installation" title="Permalink to this headline">¶</a></h2>
69 69
 <p>For Ubuntu, be sure to have enable universe repository.</p>
70 70
 <p>Install packages:</p>
71
-<div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev
71
+<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">git</span> <span class="n">build</span><span class="o">-</span><span class="n">essential</span> <span class="n">libxslt</span><span class="o">-</span><span class="n">dev</span> <span class="n">python</span><span class="o">-</span><span class="n">dev</span> <span class="n">python</span><span class="o">-</span><span class="n">virtualenv</span> <span class="n">python</span><span class="o">-</span><span class="n">pybabel</span> <span class="n">zlib1g</span><span class="o">-</span><span class="n">dev</span> <span class="n">libffi</span><span class="o">-</span><span class="n">dev</span> <span class="n">libssl</span><span class="o">-</span><span class="n">dev</span>
72 72
 </pre></div>
73 73
 </div>
74 74
 <p>Install searx:</p>
75
-<div class="code sh highlight-python"><div class="highlight"><pre>cd /usr/local
76
-sudo git clone https://github.com/asciimoo/searx.git
77
-sudo useradd searx -d /usr/local/searx
78
-sudo chown searx:searx -R /usr/local/searx
75
+<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">cd</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span>
76
+<span class="n">sudo</span> <span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">asciimoo</span><span class="o">/</span><span class="n">searx</span><span class="o">.</span><span class="n">git</span>
77
+<span class="n">sudo</span> <span class="n">useradd</span> <span class="n">searx</span> <span class="o">-</span><span class="n">d</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span>
78
+<span class="n">sudo</span> <span class="n">chown</span> <span class="n">searx</span><span class="p">:</span><span class="n">searx</span> <span class="o">-</span><span class="n">R</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span>
79 79
 </pre></div>
80 80
 </div>
81 81
 <p>Install dependencies in a virtualenv:</p>
82
-<div class="code sh highlight-python"><div class="highlight"><pre>sudo -u searx -i
83
-cd /usr/local/searx
84
-virtualenv searx-ve
85
-. ./searx-ve/bin/activate
86
-./manage.sh update_packages
82
+<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="o">-</span><span class="n">u</span> <span class="n">searx</span> <span class="o">-</span><span class="n">i</span>
83
+<span class="n">cd</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span>
84
+<span class="n">virtualenv</span> <span class="n">searx</span><span class="o">-</span><span class="n">ve</span>
85
+<span class="o">.</span> <span class="o">./</span><span class="n">searx</span><span class="o">-</span><span class="n">ve</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">activate</span>
86
+<span class="o">./</span><span class="n">manage</span><span class="o">.</span><span class="n">sh</span> <span class="n">update_packages</span>
87 87
 </pre></div>
88 88
 </div>
89 89
 </div>
90 90
 <div class="section" id="configuration">
91 91
 <h2><a class="toc-backref" href="#id4">Configuration</a><a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
92
-<div class="code sh highlight-python"><div class="highlight"><pre>sed -i -e &quot;s/ultrasecretkey/`openssl rand -hex 16`/g&quot; searx/settings.yml
92
+<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sed</span> <span class="o">-</span><span class="n">i</span> <span class="o">-</span><span class="n">e</span> <span class="s">&quot;s/ultrasecretkey/`openssl rand -hex 16`/g&quot;</span> <span class="n">searx</span><span class="o">/</span><span class="n">settings</span><span class="o">.</span><span class="n">yml</span>
93 93
 </pre></div>
94 94
 </div>
95 95
 <p>Edit searx/settings.yml if necessary.</p>
@@ -97,12 +97,12 @@ virtualenv searx-ve
97 97
 <div class="section" id="check">
98 98
 <h2><a class="toc-backref" href="#id5">Check</a><a class="headerlink" href="#check" title="Permalink to this headline">¶</a></h2>
99 99
 <p>Start searx:</p>
100
-<div class="code sh highlight-python"><div class="highlight"><pre>python searx/webapp.py
100
+<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">python</span> <span class="n">searx</span><span class="o">/</span><span class="n">webapp</span><span class="o">.</span><span class="n">py</span>
101 101
 </pre></div>
102 102
 </div>
103 103
 <p>Go to <a class="reference external" href="http://localhost:8888">http://localhost:8888</a></p>
104 104
 <p>If everything works fine, disable the debug option in settings.yml:</p>
105
-<div class="code sh highlight-python"><div class="highlight"><pre>sed -i -e &quot;s/debug : True/debug : False/g&quot; searx/settings.yml
105
+<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sed</span> <span class="o">-</span><span class="n">i</span> <span class="o">-</span><span class="n">e</span> <span class="s">&quot;s/debug : True/debug : False/g&quot;</span> <span class="n">searx</span><span class="o">/</span><span class="n">settings</span><span class="o">.</span><span class="n">yml</span>
106 106
 </pre></div>
107 107
 </div>
108 108
 <p>At this point searx is not demonized ; uwsgi allows this.</p>
@@ -112,43 +112,43 @@ twice).</p>
112 112
 <div class="section" id="uwsgi">
113 113
 <h2><a class="toc-backref" href="#id6">uwsgi</a><a class="headerlink" href="#uwsgi" title="Permalink to this headline">¶</a></h2>
114 114
 <p>Install packages:</p>
115
-<div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install uwsgi uwsgi-plugin-python
115
+<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">uwsgi</span> <span class="n">uwsgi</span><span class="o">-</span><span class="n">plugin</span><span class="o">-</span><span class="n">python</span>
116 116
 </pre></div>
117 117
 </div>
118 118
 <p>Create the configuration file /etc/uwsgi/apps-available/searx.ini with
119 119
 this content:</p>
120
-<div class="highlight-python"><div class="highlight"><pre>[uwsgi]
121
-# Who will run the code
122
-uid = searx
123
-gid = searx
120
+<div class="highlight-default"><div class="highlight"><pre><span class="p">[</span><span class="n">uwsgi</span><span class="p">]</span>
121
+<span class="c"># Who will run the code</span>
122
+<span class="n">uid</span> <span class="o">=</span> <span class="n">searx</span>
123
+<span class="n">gid</span> <span class="o">=</span> <span class="n">searx</span>
124 124
 
125
-# disable logging for privacy
126
-disable-logging = true
125
+<span class="c"># disable logging for privacy</span>
126
+<span class="n">disable</span><span class="o">-</span><span class="n">logging</span> <span class="o">=</span> <span class="n">true</span>
127 127
 
128
-# Number of workers (usually CPU count)
129
-workers = 4
128
+<span class="c"># Number of workers (usually CPU count)</span>
129
+<span class="n">workers</span> <span class="o">=</span> <span class="mi">4</span>
130 130
 
131
-# The right granted on the created socket
132
-chmod-socket = 666
131
+<span class="c"># The right granted on the created socket</span>
132
+<span class="n">chmod</span><span class="o">-</span><span class="n">socket</span> <span class="o">=</span> <span class="mi">666</span>
133 133
 
134
-# Plugin to use and interpretor config
135
-single-interpreter = true
136
-master = true
137
-plugin = python
134
+<span class="c"># Plugin to use and interpretor config</span>
135
+<span class="n">single</span><span class="o">-</span><span class="n">interpreter</span> <span class="o">=</span> <span class="n">true</span>
136
+<span class="n">master</span> <span class="o">=</span> <span class="n">true</span>
137
+<span class="n">plugin</span> <span class="o">=</span> <span class="n">python</span>
138 138
 
139
-# Module to import
140
-module = searx.webapp
139
+<span class="c"># Module to import</span>
140
+<span class="n">module</span> <span class="o">=</span> <span class="n">searx</span><span class="o">.</span><span class="n">webapp</span>
141 141
 
142
-# Virtualenv and python path
143
-virtualenv = /usr/local/searx/searx-ve/
144
-pythonpath = /usr/local/searx/
145
-chdir = /usr/local/searx/searx/
142
+<span class="c"># Virtualenv and python path</span>
143
+<span class="n">virtualenv</span> <span class="o">=</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span><span class="n">searx</span><span class="o">-</span><span class="n">ve</span><span class="o">/</span>
144
+<span class="n">pythonpath</span> <span class="o">=</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span>
145
+<span class="n">chdir</span> <span class="o">=</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span>
146 146
 </pre></div>
147 147
 </div>
148 148
 <p>Activate the uwsgi application and restart:</p>
149
-<div class="code sh highlight-python"><div class="highlight"><pre>cd /etc/uwsgi/apps-enabled
150
-ln -s ../apps-available/searx.ini
151
-/etc/init.d/uwsgi restart
149
+<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">cd</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">/</span><span class="n">apps</span><span class="o">-</span><span class="n">enabled</span>
150
+<span class="n">ln</span> <span class="o">-</span><span class="n">s</span> <span class="o">../</span><span class="n">apps</span><span class="o">-</span><span class="n">available</span><span class="o">/</span><span class="n">searx</span><span class="o">.</span><span class="n">ini</span>
151
+<span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">uwsgi</span> <span class="n">restart</span>
152 152
 </pre></div>
153 153
 </div>
154 154
 </div>
@@ -158,28 +158,28 @@ ln -s ../apps-available/searx.ini
158 158
 <h3><a class="toc-backref" href="#id8">with nginx</a><a class="headerlink" href="#with-nginx" title="Permalink to this headline">¶</a></h3>
159 159
 <p>If nginx is not installed (uwsgi will not work with the package
160 160
 nginx-light):</p>
161
-<div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install nginx
161
+<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">nginx</span>
162 162
 </pre></div>
163 163
 </div>
164 164
 <div class="section" id="hosted-at">
165 165
 <h4>Hosted at /<a class="headerlink" href="#hosted-at" title="Permalink to this headline">¶</a></h4>
166 166
 <p>Create the configuration file /etc/nginx/sites-available/searx with this
167 167
 content:</p>
168
-<div class="code nginx highlight-python"><div class="highlight"><pre>server {
169
-    listen 80;
170
-    server_name searx.example.com;
171
-    root /usr/local/searx;
168
+<div class="code nginx highlight-default"><div class="highlight"><pre><span class="n">server</span> <span class="p">{</span>
169
+    <span class="n">listen</span> <span class="mi">80</span><span class="p">;</span>
170
+    <span class="n">server_name</span> <span class="n">searx</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span><span class="p">;</span>
171
+    <span class="n">root</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span><span class="p">;</span>
172 172
 
173
-    location / {
174
-            include uwsgi_params;
175
-            uwsgi_pass unix:/run/uwsgi/app/searx/socket;
176
-    }
177
-}
173
+    <span class="n">location</span> <span class="o">/</span> <span class="p">{</span>
174
+            <span class="n">include</span> <span class="n">uwsgi_params</span><span class="p">;</span>
175
+            <span class="n">uwsgi_pass</span> <span class="n">unix</span><span class="p">:</span><span class="o">/</span><span class="n">run</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">/</span><span class="n">app</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span><span class="n">socket</span><span class="p">;</span>
176
+    <span class="p">}</span>
177
+<span class="p">}</span>
178 178
 </pre></div>
179 179
 </div>
180 180
 <p>Restart service:</p>
181
-<div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
182
-sudo service uwsgi restart
181
+<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">service</span> <span class="n">nginx</span> <span class="n">restart</span>
182
+<span class="n">sudo</span> <span class="n">service</span> <span class="n">uwsgi</span> <span class="n">restart</span>
183 183
 </pre></div>
184 184
 </div>
185 185
 </div>
@@ -187,9 +187,11 @@ sudo service uwsgi restart
187 187
 <h4>from subdirectory URL (/searx)<a class="headerlink" href="#from-subdirectory-url-searx" title="Permalink to this headline">¶</a></h4>
188 188
 <p>Add this configuration in the server config file
189 189
 /etc/nginx/sites-available/default:</p>
190
-<div class="code nginx highlight-python"><div class="highlight"><pre>location = /searx { rewrite ^ /searx/; }
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;
193 195
 }
194 196
 location @searx {
195 197
         uwsgi_param SCRIPT_NAME /searx;
@@ -200,12 +202,12 @@ location @searx {
200 202
 </pre></div>
201 203
 </div>
202 204
 <p>Enable base_url in searx/settings.yml</p>
203
-<div class="highlight-python"><div class="highlight"><pre>base_url : http://your.domain.tld/searx/
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>
204 206
 </pre></div>
205 207
 </div>
206 208
 <p>Restart service:</p>
207
-<div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
208
-sudo service uwsgi restart
209
+<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">service</span> <span class="n">nginx</span> <span class="n">restart</span>
210
+<span class="n">sudo</span> <span class="n">service</span> <span class="n">uwsgi</span> <span class="n">restart</span>
209 211
 </pre></div>
210 212
 </div>
211 213
 <div class="section" id="disable-logs">
@@ -213,12 +215,12 @@ sudo service uwsgi restart
213 215
 <p>for better privacy you can disable nginx logs about searx.</p>
214 216
 <p>how to proceed: below <code class="docutils literal"><span class="pre">uwsgi_pass</span></code> in
215 217
 /etc/nginx/sites-available/default add</p>
216
-<div class="highlight-python"><div class="highlight"><pre><span class="n">access_log</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">null</span><span class="p">;</span>
218
+<div class="highlight-default"><div class="highlight"><pre><span class="n">access_log</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">null</span><span class="p">;</span>
217 219
 <span class="n">error_log</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">null</span><span class="p">;</span>
218 220
 </pre></div>
219 221
 </div>
220 222
 <p>Restart service:</p>
221
-<div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
223
+<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">service</span> <span class="n">nginx</span> <span class="n">restart</span>
222 224
 </pre></div>
223 225
 </div>
224 226
 </div>
@@ -227,23 +229,23 @@ sudo service uwsgi restart
227 229
 <div class="section" id="with-apache">
228 230
 <h3><a class="toc-backref" href="#id9">with apache</a><a class="headerlink" href="#with-apache" title="Permalink to this headline">¶</a></h3>
229 231
 <p>Add wsgi mod:</p>
230
-<div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install libapache2-mod-uwsgi
231
-sudo a2enmod uwsgi
232
+<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">libapache2</span><span class="o">-</span><span class="n">mod</span><span class="o">-</span><span class="n">uwsgi</span>
233
+<span class="n">sudo</span> <span class="n">a2enmod</span> <span class="n">uwsgi</span>
232 234
 </pre></div>
233 235
 </div>
234 236
 <p>Add this configuration in the file /etc/apache2/apache2.conf:</p>
235
-<div class="code apache highlight-python"><div class="highlight"><pre>&lt;Location /&gt;
236
-    Options FollowSymLinks Indexes
237
-    SetHandler uwsgi-handler
238
-    uWSGISocket /run/uwsgi/app/searx/socket
239
-&lt;/Location&gt;
237
+<div class="code apache highlight-default"><div class="highlight"><pre><span class="o">&lt;</span><span class="n">Location</span> <span class="o">/&gt;</span>
238
+    <span class="n">Options</span> <span class="n">FollowSymLinks</span> <span class="n">Indexes</span>
239
+    <span class="n">SetHandler</span> <span class="n">uwsgi</span><span class="o">-</span><span class="n">handler</span>
240
+    <span class="n">uWSGISocket</span> <span class="o">/</span><span class="n">run</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">/</span><span class="n">app</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span><span class="n">socket</span>
241
+<span class="o">&lt;/</span><span class="n">Location</span><span class="o">&gt;</span>
240 242
 </pre></div>
241 243
 </div>
242 244
 <p>Note that if your instance of searx is not at the root, you should
243 245
 change <code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/&gt;</span></code> by the location of your instance, like
244 246
 <code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/searx&gt;</span></code>.</p>
245 247
 <p>Restart Apache:</p>
246
-<div class="code sh highlight-python"><div class="highlight"><pre>sudo /etc/init.d/apache2 restart
248
+<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">apache2</span> <span class="n">restart</span>
247 249
 </pre></div>
248 250
 </div>
249 251
 <div class="section" id="id1">
@@ -253,11 +255,11 @@ change <code class="docutils literal"><span class="pre">&lt;Location</span> <spa
253 255
 <p>WARNING: you can only disable logs for the whole (virtual) server not
254 256
 for a specific path.</p>
255 257
 <p>Go back to /etc/apache2/apache2.conf and above <code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/&gt;</span></code> add:</p>
256
-<div class="code apache highlight-python"><div class="highlight"><pre>CustomLog /dev/null combined
258
+<div class="code apache highlight-default"><div class="highlight"><pre><span class="n">CustomLog</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">null</span> <span class="n">combined</span>
257 259
 </pre></div>
258 260
 </div>
259 261
 <p>Restart Apache:</p>
260
-<div class="code sh highlight-python"><div class="highlight"><pre>sudo /etc/init.d/apache2 restart
262
+<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">apache2</span> <span class="n">restart</span>
261 263
 </pre></div>
262 264
 </div>
263 265
 </div>
@@ -265,30 +267,30 @@ for a specific path.</p>
265 267
 </div>
266 268
 <div class="section" id="how-to-update">
267 269
 <h2><a class="toc-backref" href="#id10">How to update</a><a class="headerlink" href="#how-to-update" title="Permalink to this headline">¶</a></h2>
268
-<div class="code sh highlight-python"><div class="highlight"><pre>cd /usr/local/searx
269
-sudo -u searx -i
270
-. ./searx-ve/bin/activate
271
-git stash
272
-git pull origin master
273
-git stash apply
274
-./manage.sh update_packages
275
-sudo service uwsgi restart
270
+<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">cd</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span>
271
+<span class="n">sudo</span> <span class="o">-</span><span class="n">u</span> <span class="n">searx</span> <span class="o">-</span><span class="n">i</span>
272
+<span class="o">.</span> <span class="o">./</span><span class="n">searx</span><span class="o">-</span><span class="n">ve</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">activate</span>
273
+<span class="n">git</span> <span class="n">stash</span>
274
+<span class="n">git</span> <span class="n">pull</span> <span class="n">origin</span> <span class="n">master</span>
275
+<span class="n">git</span> <span class="n">stash</span> <span class="n">apply</span>
276
+<span class="o">./</span><span class="n">manage</span><span class="o">.</span><span class="n">sh</span> <span class="n">update_packages</span>
277
+<span class="n">sudo</span> <span class="n">service</span> <span class="n">uwsgi</span> <span class="n">restart</span>
276 278
 </pre></div>
277 279
 </div>
278 280
 </div>
279 281
 <div class="section" id="docker">
280 282
 <h2><a class="toc-backref" href="#id11">Docker</a><a class="headerlink" href="#docker" title="Permalink to this headline">¶</a></h2>
281 283
 <p>Make sure you have installed Docker. For instance, you can deploy searx like this:</p>
282
-<div class="code sh highlight-python"><div class="highlight"><pre>docker pull wonderfall/searx
284
+<div class="code sh highlight-default"><div class="highlight"><pre>docker pull wonderfall/searx
283 285
 docker run -d --name searx -p $PORT:8888 wonderfall/searx
284 286
 </pre></div>
285 287
 </div>
286 288
 <p>Go to <a class="reference external" href="http://localhost:$PORT">http://localhost:$PORT</a>.</p>
287 289
 <p>See <a class="reference external" href="https://hub.docker.com/r/wonderfall/searx/">https://hub.docker.com/r/wonderfall/searx/</a> for more informations.</p>
288 290
 <p>It&#8217;s also possible to build searx from the embedded Dockerfile.</p>
289
-<div class="code sh highlight-python"><div class="highlight"><pre>git clone https://github.com/asciimoo/searx.git
290
-cd searx
291
-docker build -t whatever/searx .
291
+<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">asciimoo</span><span class="o">/</span><span class="n">searx</span><span class="o">.</span><span class="n">git</span>
292
+<span class="n">cd</span> <span class="n">searx</span>
293
+<span class="n">docker</span> <span class="n">build</span> <span class="o">-</span><span class="n">t</span> <span class="n">whatever</span><span class="o">/</span><span class="n">searx</span> <span class="o">.</span>
292 294
 </pre></div>
293 295
 </div>
294 296
 </div>

+ 3
- 0
docs/dev/install/installation.rst 查看文件

@@ -171,6 +171,8 @@ 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;
174 176
     }
175 177
     location @searx {
176 178
             uwsgi_param SCRIPT_NAME /searx;
@@ -179,6 +181,7 @@ Add this configuration in the server config file
179 181
             uwsgi_pass unix:/run/uwsgi/app/searx/socket;
180 182
     }
181 183
 
184
+
182 185
 Enable base\_url in searx/settings.yml
183 186
 
184 187
 ::