Commit 8b198ba4 authored by Benjamin Bouvier's avatar Benjamin Bouvier
Browse files

Fixes #849: Precise the root directive in webserver configs is facultative;

parent 4b5add48
# Change this to the path to your Kresus installation.
# Change this to the path to your Kresus installation. This is facultative and
# will just avoid the proxying of static assets requests through the NodeJS
# application.
Define KRESUS_ROOT /home/kresus/kresus/build/client
# Change this to your kresus server name.
Define KRESUS_SERVER_NAME your.domain.tld
......
......@@ -6,14 +6,18 @@ server {
server_name your.domain.tld; # Replace me!
root /home/kresus/kresus/build/client/; # Replace me!
# Indicating this root directory is facultative and just avoids the
# proxying of static assets requests through the NodeJS application. Unless
# you have an awful lot of requests to your Kresus instance, it's not
# necessary to enable it.
# root /home/kresus/kresus/build/client/; # Replace me!
# Create /home/kresus/.htpasswd file with `htpasswd -c /home/kresus/.htpasswd`
# In Debian, `htpasswd` is provided by the package `apache2-utils`
# Create /home/kresus/.htpasswd file with `htpasswd -c /home/kresus/.htpasswd`.
# In Debian, `htpasswd` is provided by the package `apache2-utils`.
auth_basic Authentication;
auth_basic_user_file /home/kresus/.htpasswd; # Replace me!
# To create the certificate
# To create the certificate:
# - comment all `ssl_*` directives in this file, along with the `rewrite`
# - reload Nginx
# - use that command (change your.domain.tld to your actual domain):
......@@ -22,15 +26,15 @@ server {
# --email tech-sys@framalistes.org --agree-tos --text \
# --renew-hook "/usr/sbin/nginx -s reload" -d your.domain.tld
# - uncomment all `ssl_*` directives
# - reload Nginx
# - reload Nginx.
ssl_certificate /etc/letsencrypt/live/your.domain.tld/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your.domain.tld/privkey.pem;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:5m;
# This is hardened SSL configuration, may prevent you to access Kresus
# if you use an old web browser. Update your browser, then!
# This hardened SSL configuration may prevent you from accessing Kresus if
# you use an old Web browser. If that's the case, go update your browser!
ssl_prefer_server_ciphers On;
ssl_protocols TLSv1.2;
ssl_ciphers 'EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:!CAMELLIA256-SHA:!AES256-SHA:!CAMELLIA128-SHA:!AES128-SHA';
......@@ -43,11 +47,15 @@ server {
rewrite .* https://$host/$request_uri permanent;
}
# Replace variables __PATH__ and __PORT__
# __PATH__: if you install kresus on yourdomain.tld/kresus, value is "kresus"
# -> it means it's a subpath, remember to remove the comment of the first line
# -> this is the same as the value of `url_prefix` you used in Kresus's config.ini
# __PORT__: the same as the value of `port` you used in Kresus's config.ini
# Replace variables __PATH__ and __PORT__ here:
# __PATH__: if you install kresus on yourdomain.tld/kresus, the value is
# "kresus";
# -> it means it's a subpath, remember to remove the comment of the first
# line.
# -> this must match the value of `url_prefix` you used in Kresus's
# config.ini.
# __PORT__: this must match the value of `port` you used in Kresus's
# config.ini.
location __PATH__/ {
try_files $uri $uri/index.html @kresus;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment