Browse Source

update install docs on reverse proxy

Noemi Vanyi 8 years ago
parent
commit
356efb967f

+ 3
- 0
_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;
174
     }
176
     }
175
     location @searx {
177
     location @searx {
176
             uwsgi_param SCRIPT_NAME /searx;
178
             uwsgi_param SCRIPT_NAME /searx;
179
             uwsgi_pass unix:/run/uwsgi/app/searx/socket;
181
             uwsgi_pass unix:/run/uwsgi/app/searx/socket;
180
     }
182
     }
181
 
183
 
184
+
182
 Enable base\_url in searx/settings.yml
185
 Enable base\_url in searx/settings.yml
183
 
186
 
184
 ::
187
 ::

+ 79
- 77
dev/install/installation.html View File

68
 <h2><a class="toc-backref" href="#id3">Basic installation</a><a class="headerlink" href="#basic-installation" title="Permalink to this headline">¶</a></h2>
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
 <p>For Ubuntu, be sure to have enable universe repository.</p>
69
 <p>For Ubuntu, be sure to have enable universe repository.</p>
70
 <p>Install packages:</p>
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
 </pre></div>
72
 </pre></div>
73
 </div>
73
 </div>
74
 <p>Install searx:</p>
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
 </pre></div>
79
 </pre></div>
80
 </div>
80
 </div>
81
 <p>Install dependencies in a virtualenv:</p>
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
 </pre></div>
87
 </pre></div>
88
 </div>
88
 </div>
89
 </div>
89
 </div>
90
 <div class="section" id="configuration">
90
 <div class="section" id="configuration">
91
 <h2><a class="toc-backref" href="#id4">Configuration</a><a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
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
 </pre></div>
93
 </pre></div>
94
 </div>
94
 </div>
95
 <p>Edit searx/settings.yml if necessary.</p>
95
 <p>Edit searx/settings.yml if necessary.</p>
97
 <div class="section" id="check">
97
 <div class="section" id="check">
98
 <h2><a class="toc-backref" href="#id5">Check</a><a class="headerlink" href="#check" title="Permalink to this headline">¶</a></h2>
98
 <h2><a class="toc-backref" href="#id5">Check</a><a class="headerlink" href="#check" title="Permalink to this headline">¶</a></h2>
99
 <p>Start searx:</p>
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
 </pre></div>
101
 </pre></div>
102
 </div>
102
 </div>
103
 <p>Go to <a class="reference external" href="http://localhost:8888">http://localhost:8888</a></p>
103
 <p>Go to <a class="reference external" href="http://localhost:8888">http://localhost:8888</a></p>
104
 <p>If everything works fine, disable the debug option in settings.yml:</p>
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
 </pre></div>
106
 </pre></div>
107
 </div>
107
 </div>
108
 <p>At this point searx is not demonized ; uwsgi allows this.</p>
108
 <p>At this point searx is not demonized ; uwsgi allows this.</p>
112
 <div class="section" id="uwsgi">
112
 <div class="section" id="uwsgi">
113
 <h2><a class="toc-backref" href="#id6">uwsgi</a><a class="headerlink" href="#uwsgi" title="Permalink to this headline">¶</a></h2>
113
 <h2><a class="toc-backref" href="#id6">uwsgi</a><a class="headerlink" href="#uwsgi" title="Permalink to this headline">¶</a></h2>
114
 <p>Install packages:</p>
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
 </pre></div>
116
 </pre></div>
117
 </div>
117
 </div>
118
 <p>Create the configuration file /etc/uwsgi/apps-available/searx.ini with
118
 <p>Create the configuration file /etc/uwsgi/apps-available/searx.ini with
119
 this content:</p>
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
 </pre></div>
146
 </pre></div>
147
 </div>
147
 </div>
148
 <p>Activate the uwsgi application and restart:</p>
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
 </pre></div>
152
 </pre></div>
153
 </div>
153
 </div>
154
 </div>
154
 </div>
158
 <h3><a class="toc-backref" href="#id8">with nginx</a><a class="headerlink" href="#with-nginx" title="Permalink to this headline">¶</a></h3>
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
 <p>If nginx is not installed (uwsgi will not work with the package
159
 <p>If nginx is not installed (uwsgi will not work with the package
160
 nginx-light):</p>
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
 </pre></div>
162
 </pre></div>
163
 </div>
163
 </div>
164
 <div class="section" id="hosted-at">
164
 <div class="section" id="hosted-at">
165
 <h4>Hosted at /<a class="headerlink" href="#hosted-at" title="Permalink to this headline">¶</a></h4>
165
 <h4>Hosted at /<a class="headerlink" href="#hosted-at" title="Permalink to this headline">¶</a></h4>
166
 <p>Create the configuration file /etc/nginx/sites-available/searx with this
166
 <p>Create the configuration file /etc/nginx/sites-available/searx with this
167
 content:</p>
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
 </pre></div>
178
 </pre></div>
179
 </div>
179
 </div>
180
 <p>Restart service:</p>
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
 </pre></div>
183
 </pre></div>
184
 </div>
184
 </div>
185
 </div>
185
 </div>
187
 <h4>from subdirectory URL (/searx)<a class="headerlink" href="#from-subdirectory-url-searx" title="Permalink to this headline">¶</a></h4>
187
 <h4>from subdirectory URL (/searx)<a class="headerlink" href="#from-subdirectory-url-searx" title="Permalink to this headline">¶</a></h4>
188
 <p>Add this configuration in the server config file
188
 <p>Add this configuration in the server config file
189
 /etc/nginx/sites-available/default:</p>
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
 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;
193
 }
195
 }
194
 location @searx {
196
 location @searx {
195
         uwsgi_param SCRIPT_NAME /searx;
197
         uwsgi_param SCRIPT_NAME /searx;
200
 </pre></div>
202
 </pre></div>
201
 </div>
203
 </div>
202
 <p>Enable base_url in searx/settings.yml</p>
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
 </pre></div>
206
 </pre></div>
205
 </div>
207
 </div>
206
 <p>Restart service:</p>
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
 </pre></div>
211
 </pre></div>
210
 </div>
212
 </div>
211
 <div class="section" id="disable-logs">
213
 <div class="section" id="disable-logs">
213
 <p>for better privacy you can disable nginx logs about searx.</p>
215
 <p>for better privacy you can disable nginx logs about searx.</p>
214
 <p>how to proceed: below <code class="docutils literal"><span class="pre">uwsgi_pass</span></code> in
216
 <p>how to proceed: below <code class="docutils literal"><span class="pre">uwsgi_pass</span></code> in
215
 /etc/nginx/sites-available/default add</p>
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
 <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>
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
 </pre></div>
220
 </pre></div>
219
 </div>
221
 </div>
220
 <p>Restart service:</p>
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
 </pre></div>
224
 </pre></div>
223
 </div>
225
 </div>
224
 </div>
226
 </div>
227
 <div class="section" id="with-apache">
229
 <div class="section" id="with-apache">
228
 <h3><a class="toc-backref" href="#id9">with apache</a><a class="headerlink" href="#with-apache" title="Permalink to this headline">¶</a></h3>
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
 <p>Add wsgi mod:</p>
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
 </pre></div>
234
 </pre></div>
233
 </div>
235
 </div>
234
 <p>Add this configuration in the file /etc/apache2/apache2.conf:</p>
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
 </pre></div>
242
 </pre></div>
241
 </div>
243
 </div>
242
 <p>Note that if your instance of searx is not at the root, you should
244
 <p>Note that if your instance of searx is not at the root, you should
243
 change <code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/&gt;</span></code> by the location of your instance, like
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
 <code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/searx&gt;</span></code>.</p>
246
 <code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/searx&gt;</span></code>.</p>
245
 <p>Restart Apache:</p>
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
 </pre></div>
249
 </pre></div>
248
 </div>
250
 </div>
249
 <div class="section" id="id1">
251
 <div class="section" id="id1">
253
 <p>WARNING: you can only disable logs for the whole (virtual) server not
255
 <p>WARNING: you can only disable logs for the whole (virtual) server not
254
 for a specific path.</p>
256
 for a specific path.</p>
255
 <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>
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
 </pre></div>
259
 </pre></div>
258
 </div>
260
 </div>
259
 <p>Restart Apache:</p>
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
 </pre></div>
263
 </pre></div>
262
 </div>
264
 </div>
263
 </div>
265
 </div>
265
 </div>
267
 </div>
266
 <div class="section" id="how-to-update">
268
 <div class="section" id="how-to-update">
267
 <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>
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
 </pre></div>
278
 </pre></div>
277
 </div>
279
 </div>
278
 </div>
280
 </div>
279
 <div class="section" id="docker">
281
 <div class="section" id="docker">
280
 <h2><a class="toc-backref" href="#id11">Docker</a><a class="headerlink" href="#docker" title="Permalink to this headline">¶</a></h2>
282
 <h2><a class="toc-backref" href="#id11">Docker</a><a class="headerlink" href="#docker" title="Permalink to this headline">¶</a></h2>
281
 <p>Make sure you have installed Docker. For instance, you can deploy searx like this:</p>
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
 docker run -d --name searx -p $PORT:8888 wonderfall/searx
285
 docker run -d --name searx -p $PORT:8888 wonderfall/searx
284
 </pre></div>
286
 </pre></div>
285
 </div>
287
 </div>
286
 <p>Go to <a class="reference external" href="http://localhost:$PORT">http://localhost:$PORT</a>.</p>
288
 <p>Go to <a class="reference external" href="http://localhost:$PORT">http://localhost:$PORT</a>.</p>
287
 <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>
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
 <p>It&#8217;s also possible to build searx from the embedded Dockerfile.</p>
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
 </pre></div>
294
 </pre></div>
293
 </div>
295
 </div>
294
 </div>
296
 </div>

+ 3
- 0
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;
174
     }
176
     }
175
     location @searx {
177
     location @searx {
176
             uwsgi_param SCRIPT_NAME /searx;
178
             uwsgi_param SCRIPT_NAME /searx;
179
             uwsgi_pass unix:/run/uwsgi/app/searx/socket;
181
             uwsgi_pass unix:/run/uwsgi/app/searx/socket;
180
     }
182
     }
181
 
183
 
184
+
182
 Enable base\_url in searx/settings.yml
185
 Enable base\_url in searx/settings.yml
183
 
186
 
184
 ::
187
 ::