including common snippet / config in all vhosts

Discussion in 'Installation/Configuration' started by Rajesh Kumar Mallah, Jan 16, 2018.

  1. Rajesh Kumar Mallah

    Rajesh Kumar Mallah New Member

    Hi ,

    We have existing customers who are used to writing
    http colon slash slash their domain name slash cpanel

    to access their cpanel

    we intend to do the same . I find that placing the following in the
    /etc/apache2/sites-enabled/100-*.vhost files does the trick
    ------------------------------------
    RewriteEngine On
    RewriteRule ^/cpanel https colon // %{SERVER_NAME}:8080/ [R,L]
    ---------------------------

    I would want to know is there a common place where this can be put.
    i found that if the above is put in a Global Context it does not work
    eg in a file in /etc/apache2/conf-enabled/

    if the same is put in individual vhost files of domains it works but i do not
    now how to "inject" such snippets into all the vhost configs.
    (even a non gui solution would do).

    regds
    Rajesh kumar mallah.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Copy the vhost.conf.master file from /usr/local/ispconfig/server/conf/ to /usr/local/ispconfig/server/conf-custom/ and then modify it there.
     
  3. Rajesh Kumar Mallah

    Rajesh Kumar Mallah New Member

    Great! it does work as expected.
    Further i would ask how to trigger the regeneration of all vhosts file after the master is changed.

    kind regards
    Rajesh Kumar Mallah.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    See Tools > Resync in ISPConfig.
     
  5. Rajesh Kumar Mallah

    Rajesh Kumar Mallah New Member

    Thanks , it did what it was expected to do!.
     

Share This Page