################################################################################
### Main config
################################################################################
ServerRoot "/usr/local/httpd"
PidFile "/var/run/httpd.pid"
LockFile "/var/run/httpd.accept.lock"
ErrorLog "/var/log/httpd/httpd_error.log"
LogLevel notice
Listen *:80
User nobody
Group nogroup
EnableMMAP On
EnableSendfile On
Timeout 10
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 2
ServerTokens Prod
ServerSignature Off
ExtendedStatus On
# Prefork MPM settings
StartServers 20
MinSpareServers 5
MaxSpareServers 15
MaxClients 200
MaxRequestsPerChild 10000
# Enable PHP module
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
################################################################################
### Vhost defaults
################################################################################
ServerAdmin root@servers.domain.net
UseCanonicalName Off
AccessFileName .htaccess
DirectoryIndex index.php index.html index.htm
TypesConfig /etc/httpd/mime.types
DefaultType text/html
################################################################################
### Log format and errors
################################################################################
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
HostnameLookups Off
ErrorDocument 404 "Error 404 - file is missing."
ErrorDocument 500 "Internal server error."
################################################################################
### Permissions
################################################################################
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Options Indexes FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Order allow,deny
Deny from all
Satisfy All
################################################################################
### Virtual hosts
################################################################################
NameVirtualHost *:80
ServerName default.hostname.servers.domain.net
DocumentRoot /var/www/_default/public/http
CustomLog /var/log/httpd/access_logs/_default.access.log combined
ErrorLog /var/log/httpd/error_logs/_default.error.log
ServerName hostname.servers.domain.net
DocumentRoot /var/www/_system/public/http
CustomLog /var/log/httpd/access_logs/_system.access.log combined
ErrorLog /var/log/httpd/error_logs/_system.error.log
SetHandler server-status
Order deny,allow
Deny from all
Allow from localhost
SetHandler server-info
Order deny,allow
Deny from all
Allow from localhost
Include /etc/httpd/vhosts/*.vhost.conf
################################################################################
### SSL virtual hosts
################################################################################
Listen 10443
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLProtocol all
SSLCipherSuite HIGH:MEDIUM
SSLSessionCache shm:/var/run/httpd_session_cache(512000)
ServerName hostname.servers.domain.net
DocumentRoot /var/www/_system/public/https
CustomLog /var/log/httpd/access_logs/_system.sslaccess.log combined
ErrorLog /var/log/httpd/error_logs/_system.sslerror.log
SSLEngine on
SSLCertificateFile /etc/ssl/certs/_default.cert
SSLCertificateKeyFile /etc/ssl/certs/_default.key
SetHandler server-info
Order deny,allow
Deny from all
Allow from localhost
SetHandler server-status
Order deny,allow
Deny from all
Allow from localhost
Include /etc/httpd/vhosts-ssl/*.vhost-ssl.conf
ServerName test.domain.net
DocumentRoot /var/www/test.domain.net/public/http
# CustomLog /var/log/httpd/access_logs/test.domain.net.access.log combined
ErrorLog /var/log/httpd/error_logs/test.domain.net.error.log