Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 10th December 2008, 19:38
skizza skizza is offline
Junior Member
 
Join Date: Dec 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default could someone please clarify vhost.conf.master

I've recently decided that I'm sick of writing config files by hand, and I'm looking for a nice web based panel for me to manage my websites with.

At the moment, ISPconfig appears to be the most suitable for this task. But before i start using it, i would like to know more about it's inner workings.

I'm currently trying to decipher the contents of vhost.conf.master

I've setup a placeholder site "example.com" (with ssl enabled as well) and the config file (/etc/apache2/sites-enabled/example.com.vhost) came out like this

Code:
<VirtualHost *:80>
  DocumentRoot /var/www/example.com/web

  ServerName example.com
  ServerAlias www.example.com www.example.com
  ServerAdmin webmaster@example.com

  ErrorLog /var/clients/client1/web1/log/error.log

        ErrorDocument 400 /error/invalidSyntax.html
        ErrorDocument 401 /error/authorizationRequired.html
        ErrorDocument 403 /error/forbidden.html
        ErrorDocument 404 /error/fileNotFound.html
        ErrorDocument 405 /error/methodNotAllowed.html
        ErrorDocument 500 /error/internalServerError.html
        ErrorDocument 503 /error/overloaded.html

  <Directory /var/www/example.com/web>
      Options FollowSymLinks Indexes
      AllowOverride Indexes AuthConfig Limit FileInfo
      Order allow,deny
      Allow from all

      # ssi enabled
      AddType text/html .shtml
      AddOutputFilter INCLUDES .shtml
      Options +Includes
  </Directory>

  # cgi enabled
  ScriptAlias  /cgi-bin/ /var/clients/client1/web1/cgi-bin/
  AddHandler cgi-script .cgi
  AddHandler cgi-script .pl
  # mod_php enabled
  AddType application/x-httpd-php .php .php3 .php4 .php5

  php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@example.com"
  php_admin_value upload_tmp_dir /var/clients/client1/web1/tmp
  php_admin_value session.save_path /var/clients/client1/web1/tmp
  #php_admin_value open_basedir /var/clients/client1/web1:/usr/share/php5


</VirtualHost>



<IfModule mod_ssl.c>
###########################################################
# SSL Vhost
###########################################################

<VirtualHost *:443>
  DocumentRoot /var/clients/client1/web1/web
  ServerName example.com
  ServerAlias www.example.com www.example.com
  ServerAdmin webmaster@example.com

  ErrorLog /var/clients/client1/web1/log/error.log

        SSLEngine on
        SSLCertificateFile /var/clients/client1/web1/ssl/example.com.crt
        SSLCertificateKeyFile /var/clients/client1/web1/ssl/example.com.key

  # cgi enabled
  ScriptAlias  /cgi-bin/ /var/clients/client1/web1/cgi-bin/
  AddHandler cgi-script .cgi
  AddHandler cgi-script .pl
  # ssi enabled
  AddType text/html .shtml
  AddOutputFilter INCLUDES .shtml
  # mod_php enabled
  AddType application/x-httpd-php .php .php3 .php4 .php5

  php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@example.com"
  php_admin_value upload_tmp_dir /var/clients/client1/web1/tmp
  php_admin_value session.save_path /var/clients/client1/web1/tmp
  #php_admin_value open_basedir /var/clients/client1/web1:/usr/share/php5


</VirtualHost>
</IfModule>

Could someone perhaps explain a bit more about all the possible config file outputs, because all the conditional <tmpl_if>....</tmpl_if> statements are very confusing to me.
Reply With Quote
Sponsored Links
  #2  
Old 11th December 2008, 18:33
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Quote:
Originally Posted by skizza View Post
I've setup a placeholder site "example.com" (with ssl enabled as well) and the config file (/etc/apache2/sites-enabled/example.com.vhost) came out like this
ISPConfig doesn't write to the /etc/apache2/sites-enabled directory.
I don't seem to understand your question.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 11th December 2008, 19:41
skizza skizza is offline
Junior Member
 
Join Date: Dec 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko View Post
ISPConfig doesn't write to the /etc/apache2/sites-enabled directory.
This is somewhat true. /etc/apache2/sites-enabled/ contains symlinks to files in /etc/apache2/sites-available which are written there by the code in "apache2_plugin.inc.php"
Reply With Quote
  #4  
Old 12th December 2008, 19:31
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Are you talking about ISPConfig 2 or 3?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 12th December 2008, 20:02
skizza skizza is offline
Junior Member
 
Join Date: Dec 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm referring to ISPConfig 3.0.0.7 on Debian GNU/Linux 4.0 (etch)
Reply With Quote
  #6  
Old 13th December 2008, 19:33
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,814
Thanks: 821
Thanked 5,340 Times in 4,189 Posts
Default

The conditional if's correspond directly to the options that are available in the ispconfig web interface for the website. For example if there is a conditional if for ssi, it corresponds to the checkbox ssi in the website settings. For the details what the different apache directives do you might want to take a look at the apache documentation:

http://httpd.apache.org/docs/2.2/
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 1st January 2009, 20:33
skizza skizza is offline
Junior Member
 
Join Date: Dec 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
The conditional if's correspond directly to the options that are available in the ispconfig web interface for the website. For example if there is a conditional if for ssi, it corresponds to the checkbox ssi in the website settings. For the details what the different apache directives do you might want to take a look at the apache documentation:

http://httpd.apache.org/docs/2.2/

I know what you mean, but that's not what I'm asking.

I was referring to "<tmpl_if name='*'>", NOT "<IfModule mod_*.c>"

Since no one has answered or for that matter understood my question, let me ask a more simple one.

In how are variables such as "system_group" in<tmpl_var name='system_group'> defined, and how could I write a config file like the output of ispconfig by hand.
Reply With Quote
  #8  
Old 2nd January 2009, 12:07
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,814
Thanks: 821
Thanked 5,340 Times in 4,189 Posts
 
Default

Quote:
I was referring to "<tmpl_if name='*'>", NOT "<IfModule mod_*.c>"
And I was talking about the <tmpl_if name='*'>, so I answered your questions already. Take a look at the website settings and you will see that the they correspond to the conditional if staements.

Quote:
In how are variables such as "system_group" in<tmpl_var name='system_group'> defined, and how could I write a config file like the output of ispconfig by hand.
The variables are defined in the apache plugin in /usr/local/ispconfig/server/plugins-available/
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
vhost.conf.master Variables jockstrap Installation/Configuration 3 29th June 2008 15:05
Perfect Setup Ubuntu 7.04: MySQL host password problem cheros HOWTO-Related Questions 6 10th January 2008 16:30
Clarify what type of ips are needed. j.turner General 11 24th April 2007 18:45
Clarify Please. UltraFlux Installation/Configuration 1 14th November 2005 09:52


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


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