My goal was to create a DokuWiki on a computer I purposely keep OFFLINE hence - localhost
I am writing this to help anyone who is looking for a quick start to getting off the ground with a Linux Mint 18.1 and Apache2 installation. If you use Ubuntu or another ubuntu/mint derivative then this could help you if you get stuck.
I offer no warranty and no support options, i just hopes this helps somebody if they get stuck like i was for the past 2 days:
Step 1: choose Ubuntu or linux mint or other ubuntu derivative
Step 2: install apache2
Step 3: goto:
https://download.dokuwiki.org/ and customize your DokuWiki then download it
Step 4: extract your DokuWiki tarball/zip to your apache2's
/var/www/html/ directory:
/var/www/html/[/m] [m]DokuWiki[/m] [m]/
Step 5:
HERE IS WHERE WE GET ANGRY: simply using your browser and going to:
localhost/DokuWiki/
will take you to a page that says:
DokuWiki Setup Error
The datadir ('pages') at ./data/pages is not found, isn't accessible or writable. You should check your config and permission settings. Or maybe you want to run the installer?
but when you click the link "installer" you get the same error message on that page as well!
THE PROBLEM IS:: the permissions page (
https://www.dokuwiki.org/install:permissions) doesn't explain how to use terminal to chmod, this isn't a typo because there's a lot of different ways to setup the permissions, the issue we are all having is that we don't see how to set the permissions up even though it is mostly clearly explained in this page. ( people all over the world just think differently is all )
HERE IS HOW WE FIX IT::
Ubuntu / Linux Mint 18.1 : ( I used Linux Mint 18.1 for this )
( you really should complete all these steps before going to the DokuWiki install.php page in order to prevent getting some errors in terminal if you try going to the page half way throu these steps.
Step A: open the "files" program ( this is linux mint's windows explorer if you are coming to linux mint 18.1 from a windows background ) and goto:
/var/www/html/
Here you should see your DokuWiki/ folder ( don't go inside it) instead just right-click the white background and click on "Open in Terminal" Note that you shouldn't have to be root but if you do then just click on "Open as root" instead then do a "Open in Terminal"
Step B: you should now be at:
userName@computerName[/m] [m]/var/www/html $
Step C: type this in and hit enter:
chmod -R 777 data/ ; chmod -R 777 lib/ ; chmod -R 777 conf/
If you get a set of errors then it means you tried using your browser to goto the installer page so just delete the whole dokuwiki folder and start over making sure _NOT_ to use the browser till you get done with these steps!!
Step D: in your terminal window type this in and hit enter: ( i use gedit 3 but if you prefer the default XED text editor then use xed in place of gedit )
IF YOU USE GEDIT:
sudo gedit /etc/apache2/apache2.conf
IF YOU USE XED:
sudo xed /etc/apache2/apache2.conf
Step E: find the place where it says: ( NOTE: STEP E is for security which is explained at this page:
https://www.dokuwiki.org/security BUT you only do what i said in Step E which is usually all you need,
however you should still review the entire security page in case other suggestions there will help you for keeping your particular linux/apache installation/configuration secure )
[m]
<Directory /var/www/>
...
</Directory>[/m]
Below that type this all in:
[m]
<Directory /var/www/dokuwiki>
order deny,allow
allow from all
</Directory>
<LocationMatch "/(data|conf|bin|inc)/">
order allow,deny
deny from all
satisfy all
</LocationMatch>[/m]
Step F: save the file _THEN_ close the gedit / xed text editor __THEN!!__ at the temrinal window type this in and hit enter:
sudo service apache2 restart
Step 6: open a BRAND NEW browser tab and then goto your
dokuwiki/install.php directory and it will take you to the doku wiki installation page
Step 7: Done!
I hope this helps someone, have a great day and good luck!