could someone please clarify vhost.conf.master

Discussion in 'Developers' Forum' started by skizza, Dec 10, 2008.

  1. skizza

    skizza New Member

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

    falko Super Moderator

    ISPConfig doesn't write to the /etc/apache2/sites-enabled directory.
    I don't seem to understand your question.
     
  3. skizza

    skizza New Member

    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"
     
  4. falko

    falko Super Moderator

    Are you talking about ISPConfig 2 or 3?
     
  5. skizza

    skizza New Member

    I'm referring to ISPConfig 3.0.0.7 on Debian GNU/Linux 4.0 (etch)
     
  6. till

    till Super Moderator

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

    skizza New Member


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

    till Super Moderator

    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.

    The variables are defined in the apache plugin in /usr/local/ispconfig/server/plugins-available/
     

Share This Page