MOON
Server: Apache
System: Linux vps.thepromohut.com 2.6.18-398.el5 #1 SMP Tue Sep 16 20:51:48 EDT 2014 i686
User: caretrak (507)
PHP: 5.2.10
Disabled: NONE
Upload Files
File: //usr/local/ssl/local/apache.backup/non_apache/___var___cpanel___templates___apache2___main.default
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#   Direct modifications to the Apache configuration file may be lost upon subsequent regeneration of the       #
#   configuration file. To have modifications retained, all modifications must be checked into the              #
#   configuration system by running:                                                                            #
#       /usr/local/cpanel/bin/apache_conf_distiller --update                                                    #
#   To see if your changes will be conserved, regenerate the Apache configuration file by running:              #
#       /usr/local/cpanel/bin/build_apache_conf                                                                 #
#   and check the configuration file for your alterations. If your changes have been ignored, then they will    #
#   need to be added directly to their respective template files.                                               #
#                                                                                                               #
#   It is also possible to add custom directives to the various "Include" files loaded by this httpd.conf       #
#   For detailed instructions on using Include files and the apache_conf_distiller with the new configuration   #
#   system refer to the documentation at: http://www.cpanel.net/support/docs/ea/ea3/customdirectives.html       #
#                                                                                                               #
#   This configuration file was built from the following templates:                                             #
#     /var/cpanel/templates/apache2/main.default                                                                #
#     /var/cpanel/templates/apache2/main.local                                                                  #
#     /var/cpanel/templates/apache2/vhost.default                                                               #
#     /var/cpanel/templates/apache2/vhost.local                                                                 #
#     /var/cpanel/templates/apache2/ssl_vhost.default                                                           #
#     /var/cpanel/templates/apache2/ssl_vhost.local                                                             #
#                                                                                                               #
#  Templates with the '.local' extension will be preferred over templates with the '.default' extension.        #
#  The only template updated by the apache_conf_distiller is main.default.                                      #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #


[% IF file_test('f', '/usr/local/apache/conf/includes/pre_main_global.conf') -%]
Include "/usr/local/apache/conf/includes/pre_main_global.conf"
[% END -%]
[% IF file_test('f', '/usr/local/apache/conf/includes/pre_main_2.conf') -%]
Include "/usr/local/apache/conf/includes/pre_main_2.conf"

[% END -%]
 

[% FOREACH dir IN main.loadmodule.items -%]
LoadModule [% dir.module %] [% dir.filename %]
[% END -%]




[% FOREACH dir IN main.include.items -%]
Include [% dir.include %]
[% END -%]


ErrorLog [% main.errorlog.item.errorlog %]
DefaultType [% main.defaulttype.item.defaulttype %]
[% FOREACH dir IN main.addtype.items -%]
AddType [% dir.mime %] [% dir.extension %]
[% END -%]

[% FOREACH dir IN main.scriptaliasmatch.items -%]
ScriptAliasMatch [% dir.regex %] [% dir.path %]
[% END -%]

[% FOREACH dir IN main.alias.items -%]
Alias [% dir.url %] [% dir.path %]
[% END -%]


[% FOREACH dir IN main.scriptalias.items -%]
ScriptAlias [% dir.url %] [% dir.path %]
[% END -%]


<Directory "[% main.maindirectory.item.directory %]">
    Options [% main.directory.options.item.options %]
    AllowOverride [% main.directory.allowoverride.item.allowoverride %]
</Directory>

<Directory "[% main.maindirectoryusrlocalapachehtdocs.item.directory %]">
    Options [% main.directoryusrlocalapachehtdocs.options.item.options %]
    AllowOverride [% main.directoryusrlocalapachehtdocs.allowoverride.item.allowoverride %]
    Order [% main.directoryusrlocalapachehtdocs.order.item.order %]
[% FOREACH dir IN main.directoryusrlocalapachehtdocs.allow.items -%]
    Allow from [% dir.allow %]
[% END -%]

</Directory>

<Files [% main.mainfileserrorlog.item.files %]>
    Order [% main.fileserrorlog.order.item.order %]
[% FOREACH dir IN main.fileserrorlog.deny.items -%]
    Deny from [% dir.deny %]
[% END -%]

    Satisfy [% main.fileserrorlog.satisfy.item.satisfy %]
</Files>

<FilesMatch [% main.mainfilesmatchht.item.filesmatch %]>
    Order [% main.filesmatchht.order.item.order %]
[% FOREACH dir IN main.filesmatchht.deny.items -%]
    Deny from [% dir.deny %]
[% END -%]

    Satisfy [% main.filesmatchht.satisfy.item.satisfy %]
</FilesMatch>

<IfModule [% main.mainifmodulelogconfigmodule.item.ifmodule %]>
[% FOREACH dir IN main.ifmodulelogconfigmodule.logformat.items -%]
    LogFormat [% dir.logformat %]
[% END -%]

[% FOREACH dir IN main.ifmodulelogconfigmodule.customlog.items -%]
    CustomLog [% dir.target %] [% dir.format %]
[% END -%]

    <IfModule [% main.mainifmodulelogconfigmoduleifmodulelogiomodule.item.ifmodule %]>
[% FOREACH dir IN main.ifmodulelogconfigmodule.ifmodulelogiomodule.logformat.items -%]
        LogFormat [% dir.logformat %]
[% END -%]

    </IfModule>

</IfModule>

<IfModule [% main.mainifmodulealiasmodule.item.ifmodule %]>
[% FOREACH dir IN main.ifmodulealiasmodule.scriptalias.items -%]
    ScriptAlias [% dir.url %] [% dir.path %]
[% END -%]

</IfModule>

<Directory "[% main.maindirectoryusrlocalapachecgibin.item.directory %]">
    AllowOverride [% main.directoryusrlocalapachecgibin.allowoverride.item.allowoverride %]
    Options [% main.directoryusrlocalapachecgibin.options.item.options %]
    Order [% main.directoryusrlocalapachecgibin.order.item.order %]
[% FOREACH dir IN main.directoryusrlocalapachecgibin.allow.items -%]
    Allow from [% dir.allow %]
[% END -%]

</Directory>

<IfModule [% main.mainifmodulemimemodule.item.ifmodule %]>
    TypesConfig [% main.ifmodulemimemodule.typesconfig.item.typesconfig %]
[% FOREACH dir IN main.ifmodulemimemodule.addtype.items -%]
    AddType [% dir.mime %] [% dir.extension %]
[% END -%]

</IfModule>

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#   Direct modifications to the Apache configuration file may be lost upon subsequent regeneration of the       #
#   configuration file. To have modifications retained, all modifications must be checked into the              #
#   configuration system by running:                                                                            #
#       /usr/local/cpanel/bin/apache_conf_distiller --update                                                    #
#   To see if your changes will be conserved, regenerate the Apache configuration file by running:              #
#       /usr/local/cpanel/bin/build_apache_conf                                                                 #
#   and check the configuration file for your alterations. If your changes have been ignored, then they will    #
#   need to be added directly to their respective template files.                                               #
#                                                                                                               #
#   It is also possible to add custom directives to the various "Include" files loaded by this httpd.conf       #
#   For detailed instructions on using Include files and the apache_conf_distiller with the new configuration   #
#   system refer to the documentation at: http://www.cpanel.net/support/docs/ea/ea3/customdirectives.html       #
#                                                                                                               #
#   This configuration file was built from the following templates:                                             #
#     /var/cpanel/templates/apache2/main.default                                                                #
#     /var/cpanel/templates/apache2/main.local                                                                  #
#     /var/cpanel/templates/apache2/vhost.default                                                               #
#     /var/cpanel/templates/apache2/vhost.local                                                                 #
#     /var/cpanel/templates/apache2/ssl_vhost.default                                                           #
#     /var/cpanel/templates/apache2/ssl_vhost.local                                                             #
#                                                                                                               #
#  Templates with the '.local' extension will be preferred over templates with the '.default' extension.        #
#  The only template updated by the apache_conf_distiller is main.default.                                      #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #


PidFile [% main.pidfile.item.pidfile %]
LockFile [% main.lockfile.item.lockfile %]
[% IF configured.ip_listen -%]
[%- FOREACH ip IN configured.ip_listen -%]
Listen [% ip %]:[% configured.main_port %]
[% END -%]
[% ELSE -%]
# Defined in /var/cpanel/cpanel.config: apache_port
Listen [% main.listen.item.listen %]
[% END -%]
Timeout [% main.timeout.item.timeout %]
User [% main.user.item.user %]
Group [% main.group.item.group %]
ExtendedStatus [% main.extendedstatus.item.extendedstatus %]
ServerAdmin [% main.serveradmin.item.serveradmin %]
ServerName [% main.servername.item.servername %]
LogLevel [% main.loglevel.item.loglevel %]

# These can be set in WHM under 'Apache Global Configuration'
[% IF main.traceenable.item.traceenable.length %]TraceEnable [% main.traceenable.item.traceenable %][% END %]
ServerSignature [% main.serversignature.item.serversignature %]
[% IF main.servertokens.item.servertokens.length %]ServerTokens [% main.servertokens.item.servertokens %][% END %]
[% IF main.fileetag.item.fileetag.length %]FileETag [% main.fileetag.item.fileetag %][% END %]

[% IF file_test('f', '/usr/local/cpanel/bin/leechprotect') -%]
RewriteMap LeechProtect prg:/usr/local/cpanel/bin/leechprotect
RewriteLock /usr/local/apache/logs/rewrite_lock
[% END -%]

[% IF supported.mod_userdir -%]
UserDir public_html
[% END -%]

[% IF supported.mod_dir -%]
# DirectoryIndex is set via the WHM -> Service Configuration -> Apache Setup -> DirectoryIndex Priority
DirectoryIndex [% main.directoryindex.item.directoryindex %]
[% END -%]

[% IF supported.mod_ssl -%]
# SSLCipherSuite can be set in WHM under 'Apache Global Configuration'
[% IF main.sslciphersuite.item.sslciphersuite.length %]SSLCipherSuite [% main.sslciphersuite.item.sslciphersuite %][% END %]
SSLPassPhraseDialog  builtin
SSLSessionCache         dbm:/usr/local/apache/logs/ssl_scache
SSLSessionCacheTimeout  300
SSLMutex  file:/usr/local/apache/logs/ssl_mutex
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin

<IfDefine SSL>
[% IF configured.ip_listen -%]
[%- FOREACH ip IN configured.ip_listen -%]
    Listen [% ip %]:[% configured.main_port_ssl %]
[% END -%]
[% ELSE -%]
    # Defined in /var/cpanel/cpanel.config: apache_ssl_port
    Listen [% main.ifdefinessl.listen.item.listen %]
[% END -%]
    AddType application/x-x509-ca-cert .crt
    AddType application/x-pkcs7-crl .crl
</IfDefine>
[% END -%]


[% IF supported.mod_mime -%]
AddHandler cgi-script .cgi .pl .plx .ppl .perl
AddHandler server-parsed .shtml
AddType text/html .shtml
AddType application/x-tar .tgz
AddType text/vnd.wap.wml .wml
AddType image/vnd.wap.wbmp .wbmp
AddType text/vnd.wap.wmlscript .wmls
AddType application/vnd.wap.wmlc .wmlc
AddType application/vnd.wap.wmlscriptc .wmlsc
[% END -%]

<Location /whm-server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
</Location>

[% IF serve_server_status %]
<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from [% allow_server_info_status_from %]
</Location>
[% END -%]
[% IF serve_server_info %]
<Location /server-info>
    SetHandler server-info
    Order deny,allow
    Deny from all
    Allow from [% allow_server_info_status_from %]
</Location>
[% END -%]

[% IF supported.suexec == 1 %]
# SUEXEC is supported
[% END -%]

[% IF file_test('f', '/usr/local/apache/conf/includes/pre_virtualhost_global.conf') -%]
Include "/usr/local/apache/conf/includes/pre_virtualhost_global.conf"
[% END -%]
[% IF file_test('f', '/usr/local/apache/conf/includes/pre_virtualhost_2.conf') -%]
Include "/usr/local/apache/conf/includes/pre_virtualhost_2.conf"
[% END -%]

# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.  

[%- FOREACH nvh IN namevirtualhosts -%]
NameVirtualHost [% nvh %]
[% END -%]
NameVirtualHost *

[%- FOREACH vh IN sharedips -%]
# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.  

<VirtualHost [% vh %]>
    ServerName [% servername %]
    DocumentRoot [% serverroot %]/htdocs
    ServerAdmin [% serveradmin %]
    [%- IF supported.mod_suphp %]
    <IfModule mod_suphp.c>
        suPHP_UserGroup nobody nobody
    </IfModule>
    [%- END %]
    [%- IF supported.mod_userdir && userdirprotect_enabled && defaultvhost.userdirprotect != '-1' %]
    UserDir disable
    [%- IF defaultvhost.userdirprotect != '' %]
    UserDir enabled [% defaultvhost.userdirprotect %]
    [%- END -%]
    [%- END %]
</VirtualHost>

[% END -%]

# Default vhost for unbound IPs

<VirtualHost *>
    ServerName [% servername %]
    DocumentRoot [% serverroot %]/htdocs
    ServerAdmin [% serveradmin %]
    [%- IF supported.mod_suphp %]
    <IfModule mod_suphp.c>
        suPHP_UserGroup nobody nobody
    </IfModule>
    [%- END %]
    [%- IF supported.mod_userdir && userdirprotect_enabled && defaultvhost.userdirprotect != '-1' %]
    UserDir disable
    [%- IF defaultvhost.userdirprotect != '' %]
    UserDir enabled [% defaultvhost.userdirprotect %]
    [%- END -%]
    [%- END %]
</VirtualHost>

[%- FOREACH vhost IN vhosts -%]

# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.  

[%- IF vhost.custom_vhost_template_ap2 != '' -%]
    [%- INCLUDE $vhost.custom_vhost_template_ap2 -%]
[%- ELSE -%]
    [%- INCLUDE $includes.vhost -%]
[%- END -%]
[%- END -%]

# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.  

# SSL
<IfDefine SSL>
[%- FOREACH vhost IN ssl_vhosts -%]

# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.  

[%- IF vhost.custom_vhost_template_ap2 != '' -%]
    [%- INCLUDE $vhost.custom_vhost_template_ap2 -%]
[%- ELSE -%]
    [%- INCLUDE $includes.ssl_vhost -%]
[%- END -%]
[%- END -%]

</IfDefine>

[% IF proxysubdomains && supported.mod_proxy && supported.mod_rewrite %]
# CPANEL/WHM/WEBMAIL/WEBDISK PROXY SUBDOMAINS
<VirtualHost[% FOREACH nvh IN namevirtualhosts %] [% nvh %][% END %] *>
    ServerName [% servername %]
    ServerAlias cpanel.* whm.* webmail.* webdisk.*
    DocumentRoot [% serverroot %]/htdocs
    ServerAdmin [% serveradmin %]
    [%- IF supported.mod_suphp %]
    <IfModule mod_suphp.c>
        suPHP_UserGroup nobody nobody
    </IfModule>
    [%- END %]
    [%- IF supported.mod_userdir && userdirprotect_enabled && defaultvhost.userdirprotect != '-1' %]
    UserDir disable
    [%- IF defaultvhost.userdirprotect != '' %]
    UserDir enabled [% defaultvhost.userdirprotect %]
    [%- END -%]
    [%- END %]
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^cpanel\.
    RewriteRule ^/(.*) http://127.0.0.1:2082/$1 [P]
    RewriteCond %{HTTP_HOST} ^webmail\.
    RewriteRule ^/(.*) http://127.0.0.1:2095/$1 [P]
    RewriteCond %{HTTP_HOST} ^whm\.
    RewriteRule ^/(.*) http://127.0.0.1:2086/$1 [P]
    RewriteCond %{HTTP_HOST} ^webdisk\.
    RewriteRule ^/(.*) http://127.0.0.1:2077/$1 [P]
    UseCanonicalName Off
</VirtualHost>
[% END %]

[% IF file_test('f', '/usr/local/apache/conf/includes/post_virtualhost_global.conf') -%]
Include "/usr/local/apache/conf/includes/post_virtualhost_global.conf"
[% END -%]
[% IF file_test('f', '/usr/local/apache/conf/includes/post_virtualhost_2.conf') -%]
Include "/usr/local/apache/conf/includes/post_virtualhost_2.conf"
[% END -%]

[% IF file_test('f', '/var/cpanel/domainfwdip') -%]
# WHM DOMAIN FORWARDING VHOST
<VirtualHost [% domainfwdip %]>
    ServerName [% domainfwdip %]
    ServerAdmin root@localhost
    DocumentRoot /dev/null
    ScriptAliasMatch .* /usr/local/cpanel/cgi-sys/domainredirect.cgi
</VirtualHost>
[% END -%]

# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.