Hi pagaille.
Create the file to be read/add to httpd.conf
VHOST_DIRECTORY_NAME is the name given to your vhost
cat > /etc/httpd/conf.d/z_WordPress.conf <<'EOT'
# **************************************
# To enable Apache to read the .htaccess in WordPress
<Directory "var/lib/nethserver/vhost/VHOST_DIRECTORY_NAME">
Options Indexes FollowSymLinks
#
AllowOverride All
#
Require all granted
</Directory>
EOT
Restart Apache
systemctl restart httpd
Create .htacces in the root of your vhost (VHOST_DIRECTORY_NAME)
# **************************************
# Pour les permaliens
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /affaires/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /affaires/index.php [L]
</IfModule>
# **************************************
# DIRECTIVES POUR APACHE
#
# Permet au serveur de suivre les liens symboliques dans les répertoires concernés.
Options +FollowSymLinks
# Empêche d'afficher le contenu des répertoires s'ils ne contiennent aucun DirectoryIndex
# c'est-à-dire index.html, index.php etc...
Options -Indexes
If you use WordFence then after installing it:
# **************************************
# Wordfence WAF
<IfModule mod_php5.c>
php_value auto_prepend_file
'/var/lib/nethserver/vhostl/VHOST_DIRECTORY_NAME/wordfence-waf.php'
</IfModule>
<Files ".user.ini">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
</Files>
# END Wordfence WAF
Ajust right
chmod 444 .htaccess
Ajust owner/group
chown apache:apache .htaccess
For more details see: https://www.micronator.org/affaires/produit/nethserver-101-cahier-06nethserver-wordpress/
For Wordfence see: https://www.micronator.org/affaires/produit/nethserver-101-cahier-07wordpress-wordfence/
Those two documents are RC-001
Michel-André