View Single Post
  #15  
Old 21st May 2012, 13:37
czdavid czdavid is offline
Member
 
Join Date: Aug 2008
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Domain 1

Code:
<Directory /var/www/domain1.cz>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost *:80>
      DocumentRoot /var/www/domain1.cz/web

    ServerName domain1.cz
    ServerAlias www.domain1.cz
    ServerAdmin webmaster@domain1.cz

    ErrorLog /var/log/ispconfig/httpd/domain1.cz/error.log

    Alias /error/ "/var/www/domain1.cz/web/error/"
    ErrorDocument 400 /error/400.html
    ErrorDocument 401 /error/401.html
    ErrorDocument 403 /error/403.html
    ErrorDocument 404 /error/404.html
    ErrorDocument 405 /error/405.html
    ErrorDocument 500 /error/500.html
    ErrorDocument 502 /error/502.html
    ErrorDocument 503 /error/503.html

    <IfModule mod_ssl.c>
    </IfModule>

    <Directory /var/www/domain1.cz/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client3/web82/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>



    # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    </FilesMatch>
    # mod_php enabled
    AddType application/x-httpd-php .php .php3 .php4 .php5
    php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@domain1.cz"
    php_admin_value upload_tmp_dir /var/www/clients/client3/web82/tmp
    php_admin_value session.save_path /var/www/clients/client3/web82/tmp
        # PHPIniDir /var/www/conf/web82
    php_admin_value open_basedir /var/www/clients/client3/web82/web:/var/www/clients/client3/web82/tmp:/var/www/domain1.cz/web:/srv/www/domain1.cz/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyad$


    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
      AssignUserId web82 client3
  </IfModule>

    <IfModule mod_dav_fs.c>
          # Do not execute PHP files in webdav directory
      <Directory /var/www/clients/client3/web82/webdav>
            <FilesMatch "\.ph(p3?|tml)$">
          SetHandler None
        </FilesMatch>
      </Directory>
      DavLockDB /var/www/clients/client3/web82/tmp/DavLock
      # DO NOT REMOVE THE COMMENTS!
      # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
      # WEBDAV END
    </IfModule>


</VirtualHost>
<VirtualHost *:443>
      DocumentRoot /var/www/domain1.cz/web

    ServerName domain1.cz
    ServerAlias www.domain1.cz
    ServerAdmin webmaster@domain1.cz

    ErrorLog /var/log/ispconfig/httpd/domain1.cz/error.log

    Alias /error/ "/var/www/domain1.cz/web/error/"
    ErrorDocument 400 /error/400.html
    ErrorDocument 401 /error/401.html
    ErrorDocument 403 /error/403.html
    ErrorDocument 404 /error/404.html
    ErrorDocument 405 /error/405.html
    ErrorDocument 500 /error/500.html
    ErrorDocument 502 /error/502.html
    ErrorDocument 503 /error/503.html

    <IfModule mod_ssl.c>
        SSLEngine on
    SSLCertificateFile /var/www/clients/client3/web82/ssl/domain1.cz.crt
    SSLCertificateKeyFile /var/www/clients/client3/web82/ssl/domain1.cz.key
    </IfModule>

    <Directory /var/www/domain1.cz/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client3/web82/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>



    # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
      SetHandler None
    </FilesMatch>
    # mod_php enabled
    AddType application/x-httpd-php .php .php3 .php4 .php5
    php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@domain1.cz"
    php_admin_value upload_tmp_dir /var/www/clients/client3/web82/tmp
    php_admin_value session.save_path /var/www/clients/client3/web82/tmp
        # PHPIniDir /var/www/conf/web82
    php_admin_value open_basedir /var/www/clients/client3/web82/web:/var/www/clients/client3/web82/tmp:/var/www/domain1.cz/web:/srv/www/domain1.cz/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyad$


    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
      AssignUserId web82 client3
    </IfModule>

    <IfModule mod_dav_fs.c>
          # Do not execute PHP files in webdav directory
      <Directory /var/www/clients/client3/web82/webdav>
            <FilesMatch "\.ph(p3?|tml)$">
          SetHandler None
        </FilesMatch>
      </Directory>
      DavLockDB /var/www/clients/client3/web82/tmp/DavLock
      # DO NOT REMOVE THE COMMENTS!
      # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
      # WEBDAV END
    </IfModule>



</VirtualHost>
Domain2

Code:
<Directory /var/www/domain2.cz>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost *:80>
      DocumentRoot /var/www/domain2.cz/web

    ServerName domain2.cz
    ServerAlias www.domain2.cz
    ServerAlias webmail.domain2.cz
    ServerAlias www.aliasfordomain.cz aliasfordomain.cz
    ServerAlias posta.domain2.cz
    ServerAlias phpmyadmin.domain2.cz
    ServerAlias mysql.domain2.cz
    ServerAlias admin.domain2.cz
    ServerAdmin webmaster@domain2.cz

    ErrorLog /var/log/ispconfig/httpd/domain2.cz/error.log

    Alias /error/ "/var/www/domain2.cz/web/error/"
    ErrorDocument 400 /error/400.html
    ErrorDocument 401 /error/401.html
    ErrorDocument 403 /error/403.html
    ErrorDocument 404 /error/404.html
    ErrorDocument 405 /error/405.html
    ErrorDocument 500 /error/500.html
    ErrorDocument 502 /error/502.html
    ErrorDocument 503 /error/503.html

    <IfModule mod_ssl.c>
    </IfModule>

    <Directory /var/www/domain2.cz/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client2/web2/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>



    # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    </FilesMatch>
    # mod_php enabled
    AddType application/x-httpd-php .php .php3 .php4 .php5
    php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@domain2.cz"
    php_admin_value upload_tmp_dir /var/www/clients/client2/web2/tmp
    php_admin_value session.save_path /var/www/clients/client2/web2/tmp
        # PHPIniDir /var/www/conf/web2
      # PHPIniDir /var/www/conf/web2
    php_admin_value open_basedir /var/www/clients/client2/web2/web:/var/www/clients/client2/web2/tmp:/var/www/domain2.cz/web:/srv/www/domain2.cz/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin

    RewriteEngine on
    RewriteCond %{HTTP_HOST}   ^aliasfordomain.cz$ [NC]
    RewriteRule   ^/(.*)$ http://domain2.cz/$1  [R=301,L]
    RewriteCond %{HTTP_HOST}   ^www.aliasfordomain.cz$ [NC]
    RewriteRule   ^/(.*)$ http://domain2.cz/$1  [R=301,L]
    RewriteCond %{HTTP_HOST}   ^posta.domain2.cz$ [NC]
    RewriteRule   ^/(.*)$ http://mail.domain2.cz/$1  [R=301,L]
    RewriteCond %{HTTP_HOST}   ^phpmyadmin.domain2.cz$ [NC]
    RewriteRule   ^/(.*)$ http://einstein.domain2.cz:8080/phpmyadmin/$1  [R=301,L]
    RewriteCond %{HTTP_HOST}   ^mysql.domain2.cz$ [NC]
    RewriteRule   ^/(.*)$ http://einstein.domain2.cz:8080/phpmyadmin/$1  [R=301,L]
    RewriteCond %{HTTP_HOST}   ^admin.domain2.cz$ [NC]
    RewriteRule   ^/(.*)$ http://emc2.domain2.cz:8080/$1  [R=301,L]

    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
      AssignUserId web2 client2
    </IfModule>

    <IfModule mod_dav_fs.c>
          # Do not execute PHP files in webdav directory
      <Directory /var/www/clients/client2/web2/webdav>
            <FilesMatch "\.ph(p3?|tml)$">
          SetHandler None
        </FilesMatch>
      </Directory>
      DavLockDB /var/www/clients/client2/web2/tmp/DavLock
      # DO NOT REMOVE THE COMMENTS!
   # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
      # WEBDAV END
    </IfModule>


</VirtualHost>
<VirtualHost *:443>
      DocumentRoot /var/www/domain2.cz/web

    ServerName domain2.cz
    ServerAlias www.domain2.cz
    ServerAlias webmail.domain2.cz
    ServerAlias www.aliasfordomain.cz aliasfordomain.cz
    ServerAlias posta.domain2.cz
    ServerAlias phpmyadmin.domain2.cz
    ServerAlias mysql.domain2.cz
    ServerAlias admin.domain2.cz
    ServerAdmin webmaster@domain2.cz

    ErrorLog /var/log/ispconfig/httpd/domain2.cz/error.log

    Alias /error/ "/var/www/domain2.cz/web/error/"
    ErrorDocument 400 /error/400.html
    ErrorDocument 401 /error/401.html
    ErrorDocument 403 /error/403.html
    ErrorDocument 404 /error/404.html
    ErrorDocument 405 /error/405.html
    ErrorDocument 500 /error/500.html
    ErrorDocument 502 /error/502.html
  ErrorDocument 503 /error/503.html

    <IfModule mod_ssl.c>
        SSLEngine on
    SSLCertificateFile /var/www/clients/client2/web2/ssl/domain2.cz.crt
    SSLCertificateKeyFile /var/www/clients/client2/web2/ssl/domain2.cz.key
    </IfModule>

    <Directory /var/www/domain2.cz/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client2/web2/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>



    # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    </FilesMatch>
    # mod_php enabled
    AddType application/x-httpd-php .php .php3 .php4 .php5
    php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@domain2.cz"
  php_admin_value upload_tmp_dir /var/www/clients/client2/web2/tmp
    php_admin_value session.save_path /var/www/clients/client2/web2/tmp
        # PHPIniDir /var/www/conf/web2
    php_admin_value open_basedir /var/www/clients/client2/web2/web:/var/www/clients/client2/web2/tmp:/var/www/domain2.cz/web:/srv/www/domain2.cz/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin

    RewriteEngine on
    RewriteCond %{HTTP_HOST}   ^aliasfordomain.cz$ [NC]
    RewriteRule   ^/(.*)$ http://domain2.cz/$1  [R=301,L]
    RewriteCond %{HTTP_HOST}   ^www.aliasfordomain.cz$ [NC]
    RewriteRule   ^/(.*)$ http://domain2.cz/$1  [R=301,L]
    RewriteCond %{HTTP_HOST}   ^posta.domain2.cz$ [NC]
    RewriteRule   ^/(.*)$ http://mail.domain2.cz/$1  [R=301,L]
    RewriteCond %{HTTP_HOST}   ^phpmyadmin.domain2.cz$ [NC]
    RewriteRule   ^/(.*)$ http://einstein.domain2.cz:8080/phpmyadmin/$1  [R=301,L]
    RewriteCond %{HTTP_HOST}   ^mysql.domain2.cz$ [NC]
    RewriteRule   ^/(.*)$ http://einstein.domain2.cz:8080/phpmyadmin/$1  [R=301,L]
    RewriteCond %{HTTP_HOST}   ^admin.domain2.cz$ [NC]
    RewriteRule   ^/(.*)$ http://emc2.domain2.cz:8080/$1  [R=301,L]

    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
      AssignUserId web2 client2
    </IfModule>

    <IfModule mod_dav_fs.c>
          # Do not execute PHP files in webdav directory
      <Directory /var/www/clients/client2/web2/webdav>
            <FilesMatch "\.ph(p3?|tml)$">
          SetHandler None
        </FilesMatch>
 </Directory>
      DavLockDB /var/www/clients/client2/web2/tmp/DavLock
      # DO NOT REMOVE THE COMMENTS!
      # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
      # WEBDAV END
    </IfModule>


</VirtualHost>
Reply With Quote