+
+Additional rules for SELinux
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+If SELinux is enabled on your system, you will need to configure additional contexts in order for wallabag to function properly. To check if SELinux is enabled, simply enter the following:
+
+``getenforce``
+
+This will return ``Enforcing`` if SELinux is enabled. Creating a new context involves the following syntax:
+
+``semanage fcontext -a -t <context type> <full path>``
+
+For example:
+
+``semanage fcontext -a -t httpd_sys_content_t "/var/www/wallabag(/.*)?"``
+
+This will recursively apply the httpd_sys_content_t context to the wallabag directory and all underlying files and folders. The following rules are needed:
+
++-----------------------------------+----------------------------+
+| Full path | Context |
++===================================+============================+
+| /var/www/wallabag(/.*)? | ``httpd_sys_content_t`` |
++-----------------------------------+----------------------------+
+| /var/www/wallabag/data(/.*)? | ``httpd_sys_rw_content_t`` |
++-----------------------------------+----------------------------+
+| /var/www/wallabag/var/logs(/.*)? | ``httpd_log_t`` |
++-----------------------------------+----------------------------+
+| /var/www/wallabag/var/cache(/.*)? | ``httpd_cache_t`` |
++-----------------------------------+----------------------------+
+
+After creating these contexts, enter the following in order to apply your rules:
+
+``restorecon -R -v /var/www/wallabag``
+
+You can check contexts in a directory by typing ``ls -lZ`` and you can see all of your current rules with ``semanage fcontext -l -C``.
+
+If you're installing the preconfigured latest-v2-package, then an additional rule is needed during the initial setup:
+
+``semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/wallabag/var"``
+
+After you successfully access your wallabag and complete the initial setup, this context can be removed:
+
+::
+
+ semanage fcontext -d -t httpd_sys_rw_content_t "/var/www/wallabag/var"
+ retorecon -R -v /var/www/wallabag/var