# File name: http.conf
# Created By: KANU from privats.ru
# Apache Apache 2.2.15 HTTP server configuration file.
# NIMP V1.2 (05.04.10)


# ================================================= 
# Basic settings 
# ================================================= 
Listen 8080
ServerName 127.0.0.1:8080
ServerAdmin admin@localhost
ServerRoot "/nimp/component/apache"
DocumentRoot "/nimp/htdocs" 
PidFile /nimp/component/logs/apache/httpd.pid 
PHPIniDir "/nimp/component/php/"
Win32DisableAcceptEx On

<IfModule dir_module>
    DirectoryIndex index.html index.htm index.php
</IfModule>

# ================================================= 
# Modules 
# =================================================
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule status_module modules/mod_status.so
LoadModule rpaf_module modules/mod_rpaf.so
LoadModule php5_module "/nimp/component/php/php5apache2_2.dll"

#!!!При подключении PHP 5.2.х закомментировать эту строку!!!
Loadfile "/nimp/component/mysql/bin/libmysql.dll"
#!!!При подключении PHP 5.2.х раскомментировать эти 2 строки!!!
#Loadfile "/nimp/component/php/libmysql.dll"
#Loadfile "/nimp/component/php/libmcrypt.dll"


#LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule authn_alias_module modules/mod_authn_alias.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbd_module modules/mod_authn_dbd.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
#LoadModule authz_owner_module modules/mod_authz_owner.so
#LoadModule cache_module modules/mod_cache.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
#LoadModule charset_lite_module modules/mod_charset_lite.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule dav_lock_module modules/mod_dav_lock.so
#LoadModule dbd_module modules/mod_dbd.so
#LoadModule deflate_module modules/mod_deflate.so
#LoadModule disk_cache_module modules/mod_disk_cache.so
#LoadModule dumpio_module modules/mod_dumpio.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule ext_filter_module modules/mod_ext_filter.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule filter_module modules/mod_filter.so
#LoadModule headers_module modules/mod_headers.so
#LoadModule ident_module modules/mod_ident.so
#LoadModule imagemap_module modules/mod_imagemap.so
#LoadModule info_module modules/mod_info.so
#LoadModule ldap_module modules/mod_ldap.so
#LoadModule logio_module modules/mod_logio.so
#LoadModule log_forensic_module modules/mod_log_forensic.so
#LoadModule mem_cache_module modules/mod_mem_cache.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule ssl_module modules/mod_ssl.so
#LoadModule substitute_module modules/mod_substitute.so
#LoadModule unique_id_module modules/mod_unique_id.so
#LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule version_module modules/mod_version.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so


# ================================================= 
# HTTP and performance settings (??????????????????)
# ================================================= 
Timeout 5
KeepAlive Off
#MaxKeepAliveRequests 50 
#KeepAliveTimeout 5

<IfModule mpm_winnt.c> 
  ThreadsPerChild 250 
  MaxRequestsPerChild  0 
</IfModule> 

<IfModule prefork.c> 
  StartServers 5
  MinSpareServers 5
  MaxSpareServers 10
  MaxClients 200
  MaxRequestsPerChild 1000
</IfModule> 

<IfModule worker.c> 
  StartServers 5
  MinSpareThreads 5
  MaxSpareThreads 10
  MaxClients 200
  ThreadsPerChild 35
  MaxRequestsPerChild 1000
</IfModule>

# ================================================= 
# Access control 
# ================================================= 
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

<Directory "/nimp/htdocs">
    Options Indexes FollowSymLinks
    DirectoryIndex index.html index.htm index.php
    AllowOverride all
    Order allow,deny
    Allow from all
</Directory>

<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>

# ================================================= 
# MIME encoding 
# ================================================= 

DefaultType text/plain

<IfModule mime_module>
  TypesConfig conf/mime.types  
  AddType application/x-compress .Z
  AddType application/x-gzip .gz .tgz
  AddType application/x-httpd-php .php
</IfModule>

# ================================================= 
# Logs: debug, info, notice, warn, error, crit
# ================================================= 
ErrorLog "/nimp/component/logs/apache/error.log"

<IfModule !mpm_netware_module>
  <IfModule !mpm_winnt_module>
    User daemon
    Group daemon
  </IfModule>
</IfModule>

LogLevel warn

<IfModule log_config_module>
  LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  LogFormat "%h %l %u %t \"%r\" %>s %b" common
    <IfModule logio_module>
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>
  CustomLog "/nimp/component/logs/apache/access.log" common
</IfModule>

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

# ================================================= 
# Cgi
# ================================================= 

<IfModule alias_module>
  ScriptAlias /cgi-bin/ "/nimp/cgi-bin/"
</IfModule>

<IfModule cgid_module>
</IfModule>

<Directory "/nimp/cgi-bin">
  DirectoryIndex index.cgi
  AllowOverride None
  Options None
  Order allow,deny
  Allow from all
</Directory>


# ================================================= 
# mod_rpaf (?????? ?????? 127.0.0.1 ?????????? ????????? ??? IP ?????.)
# ================================================= 

RPAFenable On
RPAFsethostname Off
RPAFproxy_ips 127.0.0.1 127.0.0.1
RPAFheader X-Real-IP

# ================================================= 
# Alias 
# ================================================= 

# phpmyadmin - http://localhost:8080/phpmyadmin

Alias /phpmyadmin "/nimp/component/manager/phpmyadmin/"
<Directory "/nimp/component/manager/phpmyadmin">
    DirectoryIndex index.php
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
</Directory>

# sypex_dumper - http://localhost:8080/sypex_dumper 

Alias /sypex_dumper "/nimp/component/manager/sypex_dumper/"
<Directory "/nimp/component/manager/sypex_dumper">
    DirectoryIndex index.php
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
</Directory>


# ================================================= 
# Server Status http://localhost:8080/server-status
# ================================================= 

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


# ================================================= 
#  Virtual Host
# ================================================= 


NameVirtualHost *:8080

<VirtualHost *:8080> 
  ServerName 127.0.0.1:8080
  ServerAdmin admin@localnet
  DocumentRoot "/nimp/htdocs"
</VirtualHost> 

# Include the virtual host configurations:
Include "/nimp/component/vhost/a-sites-enable/*.conf"


