Hi, how prevent apps.vhost keep being recreated/rewritten by ispconfig ? For websites vhost I could place 'nginx_vhost.conf.master' in conf-custom folder , but how about apps.vhost ? Another question, is it enough to allow only specific ip in vhost to secured phpmyadmin ? I mean, does that approach will make phpmyadmin secured from hacker ? I only allow my own IP and deny others. Thank you
Hi, you can create your own apps.vhost file in /usr/local/ispconfig/server/conf-custom/install/apache_apps.vhost.master This one is taken on ISPConfig update instead of the bundled one.
Regarding phpmyadmin it should be enough limiting the directory where it is installed to a single ip using require xxxxx granted (apache 2.4) or allow from xxxxx and deny from all (apache 2.2). You should test it afterwards to make sure you set it up correctly.
Hi @Croydon , I use nginx so do you mean this folder '/usr/local/ispconfig/server/conf-custom' ? or /usr/local/ispconfig/server/conf-custom/install ?
In the "install" folder inside conf-custom, you can override any template from "install/tpl/" in the ISPConfig update package. So in your case: conf-custom/install/nginx_apps.vhost.master
Hi @till , thanks. How about ispconfig.vhost - is it keep recreated too ? can I copy ispconfig.vhost to that folder too to prevent being rewritten ?
So every template format file (nginx_vhost.conf.master etc.) must be placed inside conf-custom and specific website vhost file inside conf-custom/install folder ?
No. Everything that is written during installation/update (so the templates from install/tpl/ in the ISPConfig package) have to go to conf-custom/install. Everything else, that resides in /usr/local/ispconfig/server/conf has to go to conf-custom if you want it to stay the same.
Will it work if I place symlink inside conf-custom & conf-custom/install ? The reason I ask this is because I want to have 'real' file elsewhere, and so everytime ispconfig update I will not lose my custom vhost. I could create new symlink after update.
Updates will not overwrite any files in the conf-custom directories, thats why they exist. You can try if a symlink works, but I'am not sure as ispconfig has symlinks checks for some file operations that might prevent this.
I'm sorry, I think I understand now that you both saying the same thing. Everything in conf-custom/install folder will be protected against written by ISPCONFIG. But files inside that folder will be written during install/update ? Am I correct ? May I know what event that will triggering vhost recreation/written ? Or its only cronjob ? Thanks
Files in conf-custom/install are used during the update (post #6) and nothing in conf-custom will be overwritten during the update. Neither the installer nor the updater will write files to conf-custom. This is just "personal template folder".