HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Feature Requests (http://www.howtoforge.com/forums/forumdisplay.php?f=31)
-   -   Simplify config of vhosts (http://www.howtoforge.com/forums/showthread.php?t=56851)

NdK 10th April 2012 14:34

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.

till 10th April 2012 16:13

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.

NdK 11th April 2012 12:04

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.

till 11th April 2012 12:50

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.

NdK 12th April 2012 14:15

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?

till 12th April 2012 14:30

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.

NdK 12th April 2012 14:46

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

till 12th April 2012 14:49

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.

NdK 12th April 2012 15:13

Quote:

Originally Posted by till (Post 277275)
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 (Post 277275)
I've added this as feature request to the bugtracker.

Tks!


All times are GMT +2. The time now is 07:07.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.