How to prevent apps.vhost being rewritten by ispconfig ?

Discussion in 'ISPConfig 3 Priority Support' started by nvidian, May 31, 2015.

  1. nvidian

    nvidian Member

    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
     
    Last edited: May 31, 2015
    Jo5hua likes this.
  2. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    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.
     
  3. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    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.
     
  4. nvidian

    nvidian Member

    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 ?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The folder is /usr/local/ispconfig/server/conf-custom/install/
     
  6. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    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
     
  7. nvidian

    nvidian Member

    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 ?
     
  8. nvidian

    nvidian Member

    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 ?
     
  9. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Yes it is, and no, you cant. It is named nginx_ispconfig.vhost.master (see my last post).
     
  10. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    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.
     
  11. nvidian

    nvidian Member

    Thanks @Croydon , its a valuable information for me.
     
  12. nvidian

    nvidian Member

    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.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    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.
     
  14. nvidian

    nvidian Member

    Hi @till , sorry I'm a little lost here between:

    and
    Please clarify those :)
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats explained by me and Croydon above. I'll cite:

     
  16. nvidian

    nvidian Member

    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
     
    Last edited: May 31, 2015
  17. florian030

    florian030 Well-Known Member HowtoForge Supporter

    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".
     
  18. nvidian

    nvidian Member

    Thanks :)
     

Share This Page