|
|
|
|
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 "s/ultrasecretkey/`openssl rand -hex 16`/g" 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">"s/ultrasecretkey/`openssl rand -hex 16`/g"</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 "s/debug : True/debug : False/g" 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">"s/debug : True/debug : False/g"</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
|
}
|
193
|
}
|
|
|
|
|
199
|
}
|
199
|
}
|
200
|
</pre></div>
|
200
|
</pre></div>
|
201
|
</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>
|
202
|
<p>Enable base_url in searx/settings.yml</p>
|
215
|
<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/
|
|
|
|
|
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>
|
204
|
</pre></div>
|
217
|
</pre></div>
|
205
|
</div>
|
218
|
</div>
|
206
|
<p>Restart service:</p>
|
219
|
<p>Restart service:</p>
|
207
|
-<div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
|
|
|
208
|
-sudo service uwsgi restart
|
|
|
|
|
220
|
+<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>
|
|
|
221
|
+<span class="n">sudo</span> <span class="n">service</span> <span class="n">uwsgi</span> <span class="n">restart</span>
|
209
|
</pre></div>
|
222
|
</pre></div>
|
210
|
</div>
|
223
|
</div>
|
211
|
<div class="section" id="disable-logs">
|
224
|
<div class="section" id="disable-logs">
|
|
|
|
|
213
|
<p>for better privacy you can disable nginx logs about searx.</p>
|
226
|
<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
|
227
|
<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>
|
228
|
/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>
|
|
|
|
|
229
|
+<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>
|
230
|
<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>
|
231
|
</pre></div>
|
219
|
</div>
|
232
|
</div>
|
220
|
<p>Restart service:</p>
|
233
|
<p>Restart service:</p>
|
221
|
-<div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
|
|
|
|
|
234
|
+<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>
|
235
|
</pre></div>
|
223
|
</div>
|
236
|
</div>
|
224
|
</div>
|
237
|
</div>
|
|
|
|
|
227
|
<div class="section" id="with-apache">
|
240
|
<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>
|
241
|
<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>
|
242
|
<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
|
|
|
|
|
243
|
+<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>
|
|
|
244
|
+<span class="n">sudo</span> <span class="n">a2enmod</span> <span class="n">uwsgi</span>
|
232
|
</pre></div>
|
245
|
</pre></div>
|
233
|
</div>
|
246
|
</div>
|
234
|
<p>Add this configuration in the file /etc/apache2/apache2.conf:</p>
|
247
|
<p>Add this configuration in the file /etc/apache2/apache2.conf:</p>
|
235
|
-<div class="code apache highlight-python"><div class="highlight"><pre><Location />
|
|
|
236
|
- Options FollowSymLinks Indexes
|
|
|
237
|
- SetHandler uwsgi-handler
|
|
|
238
|
- uWSGISocket /run/uwsgi/app/searx/socket
|
|
|
239
|
-</Location>
|
|
|
|
|
248
|
+<div class="code apache highlight-default"><div class="highlight"><pre><span class="o"><</span><span class="n">Location</span> <span class="o">/></span>
|
|
|
249
|
+ <span class="n">Options</span> <span class="n">FollowSymLinks</span> <span class="n">Indexes</span>
|
|
|
250
|
+ <span class="n">SetHandler</span> <span class="n">uwsgi</span><span class="o">-</span><span class="n">handler</span>
|
|
|
251
|
+ <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>
|
|
|
252
|
+<span class="o"></</span><span class="n">Location</span><span class="o">></span>
|
240
|
</pre></div>
|
253
|
</pre></div>
|
241
|
</div>
|
254
|
</div>
|
242
|
<p>Note that if your instance of searx is not at the root, you should
|
255
|
<p>Note that if your instance of searx is not at the root, you should
|
243
|
change <code class="docutils literal"><span class="pre"><Location</span> <span class="pre">/></span></code> by the location of your instance, like
|
256
|
change <code class="docutils literal"><span class="pre"><Location</span> <span class="pre">/></span></code> by the location of your instance, like
|
244
|
<code class="docutils literal"><span class="pre"><Location</span> <span class="pre">/searx></span></code>.</p>
|
257
|
<code class="docutils literal"><span class="pre"><Location</span> <span class="pre">/searx></span></code>.</p>
|
245
|
<p>Restart Apache:</p>
|
258
|
<p>Restart Apache:</p>
|
246
|
-<div class="code sh highlight-python"><div class="highlight"><pre>sudo /etc/init.d/apache2 restart
|
|
|
|
|
259
|
+<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>
|
260
|
</pre></div>
|
248
|
</div>
|
261
|
</div>
|
249
|
<div class="section" id="id1">
|
262
|
<div class="section" id="id1">
|
|
|
|
|
253
|
<p>WARNING: you can only disable logs for the whole (virtual) server not
|
266
|
<p>WARNING: you can only disable logs for the whole (virtual) server not
|
254
|
for a specific path.</p>
|
267
|
for a specific path.</p>
|
255
|
<p>Go back to /etc/apache2/apache2.conf and above <code class="docutils literal"><span class="pre"><Location</span> <span class="pre">/></span></code> add:</p>
|
268
|
<p>Go back to /etc/apache2/apache2.conf and above <code class="docutils literal"><span class="pre"><Location</span> <span class="pre">/></span></code> add:</p>
|
256
|
-<div class="code apache highlight-python"><div class="highlight"><pre>CustomLog /dev/null combined
|
|
|
|
|
269
|
+<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>
|
270
|
</pre></div>
|
258
|
</div>
|
271
|
</div>
|
259
|
<p>Restart Apache:</p>
|
272
|
<p>Restart Apache:</p>
|
260
|
-<div class="code sh highlight-python"><div class="highlight"><pre>sudo /etc/init.d/apache2 restart
|
|
|
|
|
273
|
+<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>
|
274
|
</pre></div>
|
262
|
</div>
|
275
|
</div>
|
263
|
</div>
|
276
|
</div>
|
|
|
|
|
265
|
</div>
|
278
|
</div>
|
266
|
<div class="section" id="how-to-update">
|
279
|
<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>
|
280
|
<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
|
|
|
|
|
281
|
+<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>
|
|
|
282
|
+<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>
|
|
|
283
|
+<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>
|
|
|
284
|
+<span class="n">git</span> <span class="n">stash</span>
|
|
|
285
|
+<span class="n">git</span> <span class="n">pull</span> <span class="n">origin</span> <span class="n">master</span>
|
|
|
286
|
+<span class="n">git</span> <span class="n">stash</span> <span class="n">apply</span>
|
|
|
287
|
+<span class="o">./</span><span class="n">manage</span><span class="o">.</span><span class="n">sh</span> <span class="n">update_packages</span>
|
|
|
288
|
+<span class="n">sudo</span> <span class="n">service</span> <span class="n">uwsgi</span> <span class="n">restart</span>
|
276
|
</pre></div>
|
289
|
</pre></div>
|
277
|
</div>
|
290
|
</div>
|
278
|
</div>
|
291
|
</div>
|
279
|
<div class="section" id="docker">
|
292
|
<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>
|
293
|
<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>
|
294
|
<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
|
|
|
|
|
295
|
+<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
|
296
|
docker run -d --name searx -p $PORT:8888 wonderfall/searx
|
284
|
</pre></div>
|
297
|
</pre></div>
|
285
|
</div>
|
298
|
</div>
|
286
|
<p>Go to <a class="reference external" href="http://localhost:$PORT">http://localhost:$PORT</a>.</p>
|
299
|
<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>
|
300
|
<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’s also possible to build searx from the embedded Dockerfile.</p>
|
301
|
<p>It’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 .
|
|
|
|
|
302
|
+<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>
|
|
|
303
|
+<span class="n">cd</span> <span class="n">searx</span>
|
|
|
304
|
+<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>
|
305
|
</pre></div>
|
293
|
</div>
|
306
|
</div>
|
294
|
</div>
|
307
|
</div>
|