AllowOverride None
    Order Deny,Allow
    Deny from all
:80>
    DocumentRoot 
  
    DocumentRoot 
  
    DocumentRoot 
  
    ServerName 
    
    ServerAdmin webmaster@
    ErrorLog /var/log/ispconfig/httpd//error.log
    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 503 /error/503.html
	
    
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
        
        # ssi enabled
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
        Options +Includes
        
            Order allow,deny
            Deny from all
            Allow from none
        
    
    
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
        
        # ssi enabled
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
        Options +Includes
        
            Order allow,deny
            Deny from all
            Allow from none
        
    
    # cgi enabled
	
      Order allow,deny
      Allow from all
    
    ScriptAlias  /cgi-bin/ /cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    # suexec enabled
    SuexecUserGroup  
    # mod_php enabled
    AddType application/x-httpd-php .php .php3 .php4 .php5
    php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@"	
    php_admin_value upload_tmp_dir /tmp
    php_admin_value session.save_path /tmp
    php_admin_value open_basedir /web:/tmp:/usr/share/php5
    # suphp enabled
    
        suPHP_Engine on
        # suPHP_UserGroup  
        AddHandler x-httpd-suphp .php .php3 .php4 .php5
        suPHP_AddHandler x-httpd-suphp
    
    # php as cgi enabled
    ScriptAlias /php5-cgi 
    Action php5-cgi /php5-cgi
    AddHandler php5-cgi .php .php3 .php4 .php5
    
        Order allow,deny
        Allow from all
    
    # php as fast-cgi enabled
    
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper  .php
        Options +ExecCGI
        AllowOverride all
        Order allow,deny
        Allow from all
    
    
    RewriteEngine on
 	RewriteCond %{http_host} ^ [nc]
        RewriteRule ^(.*)$ http://www.$1 [r=301,nc]
        RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
        RewriteRule ^index\.php$ http://www. [R=301,nc]
        RewriteCond %{REQUEST_URI} ^[A-Z]{3,9}\ /index\.html\ HTTP/
        RewriteRule ^index\.html$ http://www. [R=301,nc]
        RewriteCond %{HTTP_HOST} ^www\.([^.]+)\. [nc]
        RewriteRule ^(.*)$ http://%1.$1 [r=301,nc]
        RewriteCond %{REQUEST_URI} !^/sd_
        RewriteCond %{HTTP_HOST} !^www\. [NC]
        RewriteCond %{HTTP_HOST} ^(.*)\.
        RewriteRule (.*) /sd_%1/$1 [L]
    RewriteCond %{HTTP_HOST}   ^ [NC]
    RewriteRule   ^/(.*)$ $1  
###########################################################
# SSL Vhost
###########################################################
:443>
    DocumentRoot 
  
    DocumentRoot 
  
    DocumentRoot 
  
    ServerName 
    
    ServerAdmin webmaster@
    
    ErrorLog /var/log/ispconfig/httpd//error.log
    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 503 /error/503.html
    SSLEngine on
    SSLCertificateFile /ssl/.crt
    SSLCertificateKeyFile /ssl/.key
    SSLCACertificateFile /ssl/.bundle
    
	
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
        
        # ssi enabled
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
        Options +Includes
        
            Order allow,deny
            Deny from all
            Allow from none
        
    
    
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
        
        # ssi enabled
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
        Options +Includes
        
            Order allow,deny
            Deny from all
            Allow from none
        
    
    # cgi enabled
	
      Order allow,deny
      Allow from all
    
    ScriptAlias  /cgi-bin/ /cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    # ssi enabled
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    # suexec enabled
    SuexecUserGroup  
    # mod_php enabled
    AddType application/x-httpd-php .php .php3 .php4 .php5
    php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@"	
    php_admin_value upload_tmp_dir /tmp
    php_admin_value session.save_path /tmp
    php_admin_value open_basedir /web:/tmp:/usr/share/php5:/tmp
    suPHP_Engine on
    # suPHP_UserGroup  
    AddHandler x-httpd-suphp .php .php3 .php4 .php5
    suPHP_AddHandler x-httpd-suphp
    # php as cgi enabled
    ScriptAlias /php5-cgi 
    Action php5-cgi /php5-cgi
    AddHandler php5-cgi .php .php3 .php4 .php5
	
        Order allow,deny
        Allow from all
    
    # php as fast-cgi enabled
    
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper  .php
        Options +ExecCGI
        AllowOverride all
        Order allow,deny
        Allow from all
    
    
    RewriteEngine on
	RewriteCond %{http_host} ^ [nc]
        RewriteRule ^(.*)$ https://www.$1 [r=301,nc]
        RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
        RewriteRule ^index\.php$ https://www. [R=301,nc]
        RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
        RewriteRule ^index\.html$ https://www. [R=301,nc]
        RewriteCond %{HTTP_HOST} ^www\.([^.]+)\. [nc]
        RewriteRule ^(.*)$ https://%1.$1 [r=301,nc]
        RewriteCond %{REQUEST_URI} !^/sd_
        RewriteCond %{HTTP_HOST} !^www\. [NC]
        RewriteCond %{HTTP_HOST} ^(.*)\.
        RewriteRule (.*) /sd_%1/$1 [L]
    RewriteCond %{HTTP_HOST}   ^ [NC]
    RewriteRule   ^/(.*)$ $1