ErrorLog<span class="st"> /var/log/apache2/shaarli-error.log</span>
CustomLog<span class="st"> /var/log/apache2/shaarli-access.log combined</span>
<span class="fu"></VirtualHost></span></code></pre></div>
+<h3 id="htaccess">.htaccess</h3>
+<p>Shaarli use <code>.htaccess</code> Apache files to deny access to files that shouldn't be directly accessed (datastore, config, etc.). You need the directive <code>AllowOverride All</code> in your virtual host configuration for them to work.</p>
+<p><strong>Warning</strong>: If you use Apache 2.2 or lower, you need <a href="https://httpd.apache.org/docs/current/mod/mod_version.html">mod_version</a> to be installed and enabled.<a href=".html"></a></p>
<h2 id="lighthttpd">LightHttpd</h2>
<h2 id="nginx">Nginx</h2>
<h3 id="foreword">Foreword</h3>
<li>files may be located in a user's home directory</li>
<li>in this case, make sure both Nginx and PHP-FPM are running as the local user/group!</li>
</ul>
-<p>For all following examples, a development configuration will be used:</p>
+<p>For all following configuration examples, this user/group pair will be used:</p>
<ul>
<li><code>user:group = john:users</code>,</li>
</ul>
http {
[...][](.html)
}</code></pre>
+<h3 id="optional-increase-the-maximum-file-upload-size">(Optional) Increase the maximum file upload size</h3>
+<p>Some bookmark dumps generated by web browsers can be <em>huge</em> due to the presence of Base64-encoded images and favicons, as well as extra verbosity when nesting links in (sub-)folders.</p>
+<p>To increase upload size, you will need to modify both nginx and PHP configuration:</p>
+<pre class="nginx"><code># /etc/nginx/nginx.conf
+
+http {
+ [...][](.html)
+
+ client_max_body_size 10m;
+
+ [...][](.html)
+}</code></pre>
+<div class="sourceCode"><pre class="sourceCode ini"><code class="sourceCode ini"><span class="co"># /etc/php5/fpm/php.ini</span>
+
+<span class="kw">[...][]</span><span class="dt">(.html)</span>
+<span class="dt">post_max_size </span><span class="ot">=</span><span class="st"> 10M</span>
+<span class="kw">[...][]</span><span class="dt">(.html)</span>
+<span class="dt">upload_max_filesize </span><span class="ot">=</span><span class="st"> 10M</span></code></pre></div>
<h3 id="minimal-1">Minimal</h3>
<p><em>WARNING: Use for development only!</em></p>
<pre class="nginx"><code>user john users;
error_log /var/log/nginx/shaarli.error.log;
}
+ location = /shaarli/favicon.ico {
+ # serve the Shaarli favicon from its custom location
+ alias /var/www/shaarli/images/favicon.ico;
+ }
+
include deny.conf;
include static_assets.conf;
include php.conf;
error_log /var/log/nginx/shaarli.error.log;
}
+ location = /shaarli/favicon.ico {
+ # serve the Shaarli favicon from its custom location
+ alias /var/www/shaarli/images/favicon.ico;
+ }
+
include deny.conf;
include static_assets.conf;
include php.conf;