Hi everybody,
So I’m new to HestiaCP and dokuwiki, I quick installed dokuwiki, had to rename the temp install folder durring the install process as it sets up with a different name then what the installer is looking for, but thats not why I’m posting here.
Once in to the admin page for doku, I see " WARNING: It seems your data directory is not properly secured. Please read about Web Access Security in DokuWiki.".
Following the link shows I need to make changes to the sites nginx conf, and I find the site confs at /etc/nginx/conf.d/domains but when I nano’d into the relevent ssl.conf it has “DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS”.
So I’m looking for help to find the right conf file for the site so I can make changes that won’t be wiped out?
Thanks for your time reading through all that!
So step 1 of how to change settings for specific domain says Using .user.ini in the home directory, but there is no user.ini in the public_htm folder for the doku domain. Should I create it?
LOL just noticed that the /etc/nginx/conf/domains/example.com file header actually links to the page I mentioned earlier
anyway you are in the wrong section. you want the section under How do web templates work
Then it will matter whether you have a nginx/apache installation or an nginx only installation. I use nginx/apache so the files I copy and edit are at:
/usr/local/hestia/data/templates/web/nginx/default.{s}tpl
the section you mentioned is How can I change settings for a specific domain . I believe that is for php settings per domain. I have never had to do that so cant comment except to say that is not the way to modify your template as I thought you were asking in your original question.
Maybe the question to ask now is : are you wanting to change the php configuration of the domain or a different section of the nginx.conf ?
I may be wrong but if you are using apache then nginx is just a proxy and php is handled thru apache2 php-fpm
You may be able to get away with just creating a single file. The nginx config is designed to include any files such as nginx.conf_anything or nginx.ssl.conf_anything. As the lines you need to include are fairly simple, maybe you can get away with this (as root)
nano /home/user/conf/web/domain.com/nginx.ssl.conf_security
add
Save. Then
nginx -t && nginx -s reload
If that doesn’t work, then you might need the template approach. It might not work, if there are other rules that supercede it being processed earlier in the config, for example.
Sure this could work but not learning how templates work in hestia will severely limit the usefulness of hestia to the user. It is part of the framework of hestia.
Secondly his whole issue of changing the install root may could be causing his warning and may have been able to be handled within hestia ‘custom doc root’ but I didnt bother to go there as it wasnt his question. It is covered in the docs
Sorry . Didnt mean to confuse you . But this is what I meant by ‘install root’
hmmm. this url generator leaves out the hash/anchor tag/ fragment. But I digress. you need to scroll down the page to the ‘Using a different root directory’ section Web Domains | Hestia Control Panel
I feel I need to explain what I did to install dokuwiki and why I did it, as I think I discovered a bug in the quick app install process. So in pressing the button to install dokuwiki, you are presented with an error, and I tested it with three different domains and even reinstalled hestia several times as I thought I screwed up. When I took a look in the temp install folder after I got the error, as the error claimed it couldn’t find a folder durring the install process, I found the files for the doku installer with an extra number at the end of the version number in the name of the folder. I think it might be a problem with the install script? I just have no idea how that would be a custom root directory or anything like that, as I just helped the installer find the files it wanted.
Got it. I use apache + nginx so dont have any experience here but to answer your original question, this reply still stands and this link is included ( well a close variant) on the top of the file that said ‘DO NOT MODIFY’
As mentioned earlier, you want the section entitled ‘How do web templates work’
which file you actually use as a template depends on which aspects you are wanting to change, ie nginx proxy or php settings. Since I dont use purely nginx I dont know which file it would be for php settings. All my templates use apache for php
So… In learning about the web templates I discovered that there already is a template for dokuwiki that solves the issue. So the problem was already solved by hestia CP before I even had it.
Either way, thanks for your help you two!
For the next person who encounters this issue, go edit the web domain, look down to the bottom and press the advanced options button, then click on the drop down list for web template and select dokuwiki and save the changes. Now you’ve got a happy dokuwiki!