
10th April 2012, 14:34
|
|
Member
|
|
Join Date: Jul 2009
Posts: 35
Thanks: 1
Thanked 3 Times in 1 Post
|
|
Simplify config of vhosts
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.
|

10th April 2012, 16:13
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,911
Thanks: 693
Thanked 4,198 Times in 3,213 Posts
|
|
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.
|

11th April 2012, 12:04
|
|
Member
|
|
Join Date: Jul 2009
Posts: 35
Thanks: 1
Thanked 3 Times in 1 Post
|
|
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.
|

11th April 2012, 12:50
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,911
Thanks: 693
Thanked 4,198 Times in 3,213 Posts
|
|
Quote:
|
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.
|
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.
Quote:
|
BTW, I used that method to add Nagios only to a specific vhost.
|
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.
|

12th April 2012, 14:15
|
|
Member
|
|
Join Date: Jul 2009
Posts: 35
Thanks: 1
Thanked 3 Times in 1 Post
|
|
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?
|

12th April 2012, 14:30
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,911
Thanks: 693
Thanked 4,198 Times in 3,213 Posts
|
|
Quote:
|
Well, Nagios vhost isn't "known" to ISPConfig, so it won't get rewritten.
|
I thought you were talking about ispconfig as you posted to the ispconfig forum.
Quote:
|
but... shouldn't I be allowed to choose that "NNN" on a site-by-site basis?
|
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.
|

12th April 2012, 14:46
|
|
Member
|
|
Join Date: Jul 2009
Posts: 35
Thanks: 1
Thanked 3 Times in 1 Post
|
|
Quote:
|
Originally Posted by till
I thought you were talking about ispconfig as you posted to the ispconfig forum.
|
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)
Quote:
|
Originally Posted by till
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.
|
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...
|

12th April 2012, 14:49
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,911
Thanks: 693
Thanked 4,198 Times in 3,213 Posts
|
|
Quote:
|
Uhm... Shouldn't a 'single digit' be enough for that?
|
The default for Debian based distributions is 3 digits so we used thsi as default for ispconfig too.
Quote:
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...
|
I've added this as feature request to the bugtracker.
|

12th April 2012, 15:13
|
|
Member
|
|
Join Date: Jul 2009
Posts: 35
Thanks: 1
Thanked 3 Times in 1 Post
|
|
Quote:
Originally Posted by till
The default for Debian based distributions is 3 digits so we used thsi as default for ispconfig too.
|
Ok. But strange
Quote:
Originally Posted by till
I've added this as feature request to the bugtracker.
|
Tks!
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 07:29.
|
Recent comments
1 day 6 hours ago
1 day 11 hours ago
1 day 15 hours ago
1 day 17 hours ago
2 days 7 hours ago
2 days 7 hours ago
2 days 12 hours ago
2 days 19 hours ago
2 days 20 hours ago
2 days 21 hours ago