EDIT: SOLVED - See silly mistake at bottom... correct me if still wrong.
Ok, I spent entire day on this, read the relevant wiki's several times, etc. And it just be nice if someone would be my hero right now.
I've had it working a couple of times where I don't get the
"it seems your data directory is not properly secured"
But then I am unsure if I done the right things.. And I try to reproduce, because I am also working on a auto-installer script, which actually works fine, just not for permissions yet. (It runs as virtual machine, so I just keep reverting to old snapshot in beginning).
It's also no problem for me to make it so that I cannot view the "
http://yourserver.com/data/pages/wiki/dokuwiki.txt" file.
But again, I might still be getting the security warning.
I also clear my browser cache, if thats the problem.
I run Apache 2.4.6 and CentOS Linux release 7.6.1810 (Core)
Selinux is disabled.
I am trying not to run it as a vHost, but instead as the only thing hosted.
The wiki pages says that using the ".htaccess" file is the easiest way, so thats what I am working on.
Is it a problem I rename it from ".htaccess.dist" to ".htaccess" ?, a guide out there does this.
I gather that I haft to change the..
<Directory "/var/www">
AllowOverride None
# Allow open access:
Require all granted
</Directory>
To
<Directory "/var/www">
AllowOverride All
# Allow open access:
Require all granted
</Directory>
But then there are 3 places in my httpd.conf file where that can be configured with "AllowOverride All". Which one, or which combo?.
Also, this can exsist in other conf files, it's in the "Welcome.conf" too in conf.d folder, I comment all that out.
My script for installing looks like this... (it's my first real script, so bear with me).
#!/bin/bash
echo "Updating...."
yum update -y
yum install wget epel-release httpd -y
yum update -y
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum -y install php71w php71w-curl php71w-cli php71w-gd
systemctl start httpd
systemctl enable httpd
cd /var/www/html
wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
tar -xvf dokuwiki-stable.tgz -C /var/www/html/
shopt -s dotglob
mv dokuwiki-20*/* /var/www/html/
mv .htaccess.dist .htaccess
chown -R apache:apache /var/www/html
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --reload
rm dokuwiki-stable.tgz -f
rm dokuwiki-20* -d -f
systemctl restart httpd
echo "Done"
EDIT: My mistake - Solution
I think... my mistake has been that misread the section I had to edit in httpd.conf
The <Directory "/var/www/html">... Not! <Directory "/var/www"> ... D'oh!.