Simplify config of vhosts

Discussion in 'Feature Requests' started by NdK, Apr 10, 2012.

  1. NdK

    NdK New Member

    When you have both http and https for the same site, great part of the config is duplicated, while it would be sufficient to save the "core" definition in a file then do:
    <VirtualHost *:80>
    Include /.../vhost.include
    </VirtualHost>
    <VirtualHost *:443>
    SSLEngine on
    SSLCertificateFile ...
    Include /.../vhost.include
    </VirtualHost>

    HIH.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    In your setup, apache has to open two config files while the current setup requires only one file. The vhost files are not made for manual editing anyway, when you want to modify them then you modify the ispconfig vhost master template and in the master template there is only one vhost definition in a loop statement.
     
  3. NdK

    NdK New Member

    Well, since config files are read only at startup, it's not a big drawback... But if one needs to do some changes manually, it becomes harder to mess it.

    BTW, I used that method to add Nagios only to a specific vhost.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    All manual changes in the files get removed automatically. If you want to add some custom directives, use the apache directives field on the options tab of the website settings in ispconfig.

    thn your changes will get removed as soon as the vhost is rewritten the next time. To make your changes permanently, add them in the apache directives field.
     
  5. NdK

    NdK New Member

    Well, Nagios vhost isn't "known" to ISPConfig, so it won't get rewritten.

    Speaking of "rewriting config"... I noticed that now, when I edit a vhost, its symlink in /etc/apache2/sites-enabled becomes NNN-hostname. That's OK, but... shouldn't I be allowed to choose that "NNN" on a site-by-site basis? Or am I missing something?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    I thought you were talking about ispconfig as you posted to the ispconfig forum.

    This is set automatically depending on the the auto subdomain you choose to ensure that wildcards come after the domains. So this should not be editable by the user or admin, its managed by ispconfig.
     
  7. NdK

    NdK New Member

    Well, other vhosts on that server are managed by ISPConfig. And Nagios was, too. But it became a mess when I needed an upgrade -- too much copying around, so I used the method in the first post to include its "standard Apache config" (from distro packages), enclosing it in an ad-hoc vhost definition (that, incidentally, is the one ISPConfig generated) :)

    Uhm... Shouldn't a 'single digit' be enough for that?
    Being able to redefine site ordering w/o changing host names is really useful for SNI-enabled servers, to guarantee a predefined ssl-vhost for non-SNI-enabled clients.
    And should be really easy to implement...
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    The default for Debian based distributions is 3 digits so we used thsi as default for ispconfig too.

    I've added this as feature request to the bugtracker.
     
  9. NdK

    NdK New Member

    Ok. But strange :)

    Tks!
     

Share This Page