ServerType standalone
ServerRoot "/etc/httpd"
LockFile "/var/run/httpd.lock"
PidFile "/var/run/httpd.pid"
ScoreBoardFile "logs/apache_runtime_status"
ResourceConfig "/dev/null"
AccessConfig "/dev/null"

MinSpareServers 10
MaxSpareServers 15
StartServers 5
MaxClients 256
MaxRequestsPerChild 1000

LoadModule vhost_alias_module /usr/lib/apache/mod_vhost_alias.so
LoadModule env_module         /usr/lib/apache/mod_env.so
LoadModule config_log_module  /usr/lib/apache/mod_log_config.so
LoadModule agent_log_module   /usr/lib/apache/mod_log_agent.so
LoadModule referer_log_module /usr/lib/apache/mod_log_referer.so
LoadModule mime_module        /usr/lib/apache/mod_mime.so
LoadModule negotiation_module /usr/lib/apache/mod_negotiation.so
LoadModule status_module      /usr/lib/apache/mod_status.so
LoadModule info_module        /usr/lib/apache/mod_info.so
LoadModule includes_module    /usr/lib/apache/mod_include.so
LoadModule autoindex_module   /usr/lib/apache/mod_autoindex.so
LoadModule dir_module         /usr/lib/apache/mod_dir.so
LoadModule cgi_module         /usr/lib/apache/mod_cgi.so
LoadModule asis_module        /usr/lib/apache/mod_asis.so
LoadModule imap_module        /usr/lib/apache/mod_imap.so
LoadModule action_module      /usr/lib/apache/mod_actions.so
LoadModule userdir_module     /usr/lib/apache/mod_userdir.so
LoadModule alias_module       /usr/lib/apache/mod_alias.so
LoadModule rewrite_module     /usr/lib/apache/mod_rewrite.so
LoadModule access_module      /usr/lib/apache/mod_access.so
LoadModule auth_module        /usr/lib/apache/mod_auth.so
LoadModule anon_auth_module   /usr/lib/apache/mod_auth_anon.so
LoadModule expires_module     /usr/lib/apache/mod_expires.so
LoadModule headers_module     /usr/lib/apache/mod_headers.so
LoadModule setenvif_module    /usr/lib/apache/mod_setenvif.so
LoadModule ssl_module         /usr/lib/apache/libssl.so
Include	/etc/httpd/conf/extra/httpd-phpmodules.conf

ClearModuleList
AddModule mod_vhost_alias.c
AddModule mod_env.c
AddModule mod_log_config.c
AddModule mod_log_agent.c
AddModule mod_log_referer.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_status.c
AddModule mod_info.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
AddModule mod_userdir.c
AddModule mod_alias.c
AddModule mod_rewrite.c
AddModule mod_access.c
AddModule mod_auth.c
AddModule mod_auth_anon.c
AddModule mod_expires.c
AddModule mod_headers.c
AddModule mod_so.c
AddModule mod_setenvif.c
AddModule mod_ssl.c
Include	/etc/httpd/conf/extra/httpd-phpaddmodules.conf

#AddModule mod_frontpage.c

Port 80

Listen 80
Listen 443

User apache
Group apache

ServerAdmin root@localhost
DocumentRoot "/var/www/html"

<Directory /home/*>
    AllowOverride All
    Options -MultiViews -Indexes FollowSymlinks IncludesNoExec +Includes
<Limit GET POST OPTIONS PROPFIND>
    Order allow,deny
    Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
    Order deny,allow
    Deny from all
</LimitExcept>
</Directory>

<Directory />
    Options All
    AllowOverride All
</Directory>

<Directory "/var/www/html">
    Options -Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
    <IfModule mod_suphp.c>
        suPHP_Engine On
        suPHP_UserGroup webapps webapps
	SetEnv PHP_INI_SCAN_DIR
    </IfModule>
</Directory>

AddHandler cgi-script .cgi .pl

<IfModule mod_dir.c>
    DirectoryIndex index.html index.htm index.shtml index.php index.php6 index.php5 index.php4 index.php3 index.phtml index.cgi index.wap
</IfModule>

AccessFileName .htaccess
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</Files>

<IfModule mod_mime.c>
    TypesConfig /etc/mime.types
</IfModule>

DefaultType text/plain

<IfModule mod_mime_magic.c>
    MIMEMagicFile conf/magic
</IfModule>

ErrorLog logs/error_log

LogLevel warn

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
LogFormat "%b" bytes

CustomLog logs/access_log combined

<IfModule mod_alias.c>

    Alias /icons/ "/var/www/icons/"

    <Directory "/var/www/icons">
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

    Alias /server-images/ "/var/www/html/images/"
    <Directory "/var/www/html/images">
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

    <Directory "/var/www/cgi-sbin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    </Directory>

</IfModule>


<IfModule mod_autoindex.c>

    IndexOptions FancyIndexing NameWidth=*

    AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

    AddIconByType (TXT,/icons/text.gif) text/*
    AddIconByType (IMG,/icons/image2.gif) image/*
    AddIconByType (SND,/icons/sound2.gif) audio/*
    AddIconByType (VID,/icons/movie.gif) video/*

    AddIcon /icons/binary.gif .bin .exe
    AddIcon /icons/binhex.gif .hqx
    AddIcon /icons/tar.gif .tar
    AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
    AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
    AddIcon /icons/a.gif .ps .ai .eps
    AddIcon /icons/layout.gif .html .shtml .htm .pdf
    AddIcon /icons/text.gif .txt
    AddIcon /icons/c.gif .c
    AddIcon /icons/p.gif .pl .py
    AddIcon /icons/f.gif .for
    AddIcon /icons/dvi.gif .dvi
    AddIcon /icons/uuencoded.gif .uu
    AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
    AddIcon /icons/tex.gif .tex
    AddIcon /icons/bomb.gif core

    AddIcon /icons/back.gif ..
    AddIcon /icons/hand.right.gif README
    AddIcon /icons/folder.gif ^^DIRECTORY^^
    AddIcon /icons/blank.gif ^^BLANKICON^^

    DefaultIcon /icons/unknown.gif

    #AddDescription "GZIP compressed document" .gz
    #AddDescription "tar archive" .tar
    #AddDescription "GZIP compressed tar archive" .tgz

    ReadmeName README
    HeaderName HEADER

    IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

</IfModule>

<IfModule mod_mime.c>

    AddType application/x-tar .tgz

    <IfModule mod_php5.c>
	<FilesMatch "\.(inc|php|php3|php4|php5|php6|phtml|phps)$">
        	AddType application/x-httpd-php .inc .php .php3 .php4 .php5 .phtml
	        AddType application/x-httpd-php-source .phps
	</FilesMatch>
    </IfModule>
    <IfModule mod_php6.c>
	<FilesMatch "\.(inc|php|php3|php4|php5|php6|phtml|phps)$">
        	AddType application/x-httpd-php .inc .php .php3 .php4 .php5 .php6 .phtml
 	        AddType application/x-httpd-php-source .phps
	</FilesMatch>
    </IfModule>
    <IfModule mod_php.c>
        AddType application/x-httpd-php .phtml
    </IfModule>

    AddHandler cgi-script .cgi .pl

    AddType text/html .shtml
    AddHandler server-parsed .shtml

    #AddHandler send-as-is asis

    AddHandler imap-file map

    #AddHandler type-map var

</IfModule>

<IfModule mod_setenvif.c>
    BrowserMatch "Mozilla/2" nokeepalive
    BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
    BrowserMatch "RealPlayer 4\.0" force-response-1.0
    BrowserMatch "Java/1\.0" force-response-1.0
    BrowserMatch "JDK/1\.0" force-response-1.0
</IfModule>

AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl

<IfModule mod_ssl.c>
SSLPassPhraseDialog  builtin
SSLSessionCache        none
SSLSessionCacheTimeout  300
SSLMutex  file:logs/ssl_mutex
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLLog      logs/ssl_engine_log
SSLLogLevel error
</IfModule>

##
## SSL Virtual Host Context
##

<VirtualHost _default_:443>

ErrorLog logs/error_log
TransferLog logs/access_log

SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key

<Files ~ "\.(cgi|shtml|phtml|php3?)$">
    SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
    SSLOptions +StdEnvVars
</Directory>

SetEnvIf User-Agent ".*MSIE.*" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0

CustomLog logs/ssl_request_log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

</VirtualHost>

#######################################################################################
# Do not change anything in included files, because they are rewritten by DirectAdmin #
#######################################################################################

# This is needed for PHP
Include conf/extra/httpd-php-handlers.conf

# Include some DirectAdmin alias
Include conf/extra/httpd-alias.conf

# Fancy directory listings
Include conf/extra/httpd-autoindex.conf

# Language settings
Include conf/extra/httpd-languages.conf

# Multi-language error messages
Include conf/extra/httpd-multilang-errordoc.conf

# Real-time info on requests and configuration
Include conf/extra/httpd-info.conf

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

# Various default settings
Include conf/extra/httpd-default.conf

# All the DirectAdmin vhosts
Include conf/extra/directadmin-vhosts.conf

# All suPHP directives
Include conf/extra/httpd-suphp.conf

# All the other includes needed by the custombuild script
Include conf/extra/httpd-includes.conf

#######################################################################################
# End of included files that are rewritten by DirectAdmin                             #
#######################################################################################
