#/etc/httpd/conf/httpd.conf
# 
# Plik konfiguracyjny apache
#
# Pami�taj, �e po zmianie ustawie� musisz zrestartowa� apache 
#
# Je�eli interesuj� Cie ustawienia php, virtual host�w lub ssl, zajrzyj
# na koniec tego pliku
#
# Aby dobrze skonfigurowac apache, nale�y przejrze� plik konfiguracyjny
# i zoptymalizowa� go pod k�tem zastosowania apache na swoim serwerze.
# Warto zapozna� si� z informacjami zawartymi na stronach apache
# http://httpd.apache.org/docs/2.2/mod/directives.html
#
# Przy konfigurowaniu apache, szczeg�ln� uwag� zwr�� na ustawienia g��wne
# i zakomentowanie niepotrzenych modu��w. 

# 
# # USTAWIENIA G��WNE 
# 

# Miejsce przechowywania plik�w Apache.
ServerRoot "/etc/httpd"

# Port lub/i ip na kt�rym ma nas�uchiwa� apache.
Listen 80

# Grupa i user na ktorym bedzie uruchomiony apache
User nobody
Group nobody

# Adres email administratora(wykorzystywany na domy�lnych stronach b��d�w)
ServerAdmin admin@twojadomena.pl

# Nazwa serwera, je�eli nie posiadasz wykupionej domeny, mo�esz wpisa� tu 
# adres ip.
ServerName localhost:80

# Maksymalna liczba klient�w. Uwaga! Ustawiaj�c t� zmienn�, pami�taj aby
# dopasowa� liczb� do mo�liwo�ci sprz�towych Twojego serwera.
MaxClients 200

# Maksymalna liczba po��cze� od jednego u�ytkownika
MaxRequestsPerChild 10000

UseCanonicalName Off

# Folder g�owny serwera
DocumentRoot "/home/httpd/html"

# Nadrz�dne ustawienia dla katalog�w    
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

# Ustawienia globalne dla DocumentRoot.
<Directory "/home/httpd/html">
    Options Indexes FollowSymLinks
    AllowOverride AuthConfig
    Order allow,deny
    Allow from all
</Directory>


# Foldery uzytkownikow
UserDir public_html
<Directory /home/*/public_html/>
    AllowOverride FileInfo AuthConfig Limit Indexes
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec 
    IndexOptions +FoldersFirst +FancyIndexing
    <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>

AccessFileName .htaccess

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

TypesConfig /etc/httpd/conf/mime.types

DefaultType text/plain

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


#
# # �adowane modu�y
#
# Modu�y pozwalaj� rozszerzy� apache o nowe funkcje
# Domy�lnie uruchamiane s� tylko standardowe modu�y
# Je�eli chcesz u�ywa� dodatkowych modu��w, odkomentuj linie w kt�rych s�
# �adowane
# 
# Uwaga! Istniej�ce tutaj modu�y to nie wszystko co potrafi apache! 
# O innych modu�ach mo�esz przeczyta� w dokumentacji apache.

LoadModule actions_module           /usr/lib/apache/mod_actions.so
LoadModule alias_module             /usr/lib/apache/mod_alias.so
LoadModule asis_module              /usr/lib/apache/mod_asis.so
LoadModule auth_basic_module        /usr/lib/apache/mod_auth_basic.so
LoadModule auth_digest_module       /usr/lib/apache/mod_auth_digest.so
LoadModule authn_anon_module        /usr/lib/apache/mod_authn_anon.so
LoadModule authn_dbd_module         /usr/lib/apache/mod_authn_dbd.so
LoadModule authn_dbm_module         /usr/lib/apache/mod_authn_dbm.so
LoadModule authn_default_module     /usr/lib/apache/mod_authn_default.so
LoadModule authn_file_module        /usr/lib/apache/mod_authn_file.so
LoadModule authz_dbm_module         /usr/lib/apache/mod_authz_dbm.so
LoadModule authz_default_module     /usr/lib/apache/mod_authz_default.so
LoadModule authz_groupfile_module   /usr/lib/apache/mod_authz_groupfile.so
LoadModule authz_host_module        /usr/lib/apache/mod_authz_host.so
LoadModule authz_owner_module       /usr/lib/apache/mod_authz_owner.so
LoadModule authz_user_module        /usr/lib/apache/mod_authz_user.so
LoadModule autoindex_module         /usr/lib/apache/mod_autoindex.so
#LoadModule cern_meta_module        /usr/lib/apache/mod_cern_meta.so
LoadModule cgi_module               /usr/lib/apache/mod_cgi.so
#LoadModule dav_module               /usr/lib/apache/mod_dav.so
#LoadModule dav_fs_module            /usr/lib/apache/mod_dav_fs.so
#LoadModule dbd_module              /usr/lib/apache/mod_dbd.so
#LoadModule deflate_module          /usr/lib/apache/mod_deflate.so
LoadModule dir_module               /usr/lib/apache/mod_dir.so
#LoadModule dumpio_module           /usr/lib/apache/mod_dumpio.so
LoadModule env_module               /usr/lib/apache/mod_env.so
LoadModule expires_module           /usr/lib/apache/mod_expires.so
LoadModule ext_filter_module        /usr/lib/apache/mod_ext_filter.so
#LoadModule filter_module           /usr/lib/apache/mod_filter.so
LoadModule headers_module           /usr/lib/apache/mod_headers.so
#LoadModule ident_module            /usr/lib/apache/mod_ident.so
#LoadModule imagemap_module         /usr/lib/apache/mod_imagemap.so
LoadModule include_module           /usr/lib/apache/mod_include.so
#LoadModule info_module             /usr/lib/apache/mod_info.so
LoadModule log_config_module        /usr/lib/apache/mod_log_config.so
#LoadModule log_forensic_module     /usr/lib/apache/mod_log_forensic.so
#LoadModule logio_module            /usr/lib/apache/mod_logio.so
LoadModule mime_module              /usr/lib/apache/mod_mime.so
LoadModule mime_magic_module        /usr/lib/apache/mod_mime_magic.so
LoadModule negotiation_module       /usr/lib/apache/mod_negotiation.so
#LoadModule proxy_module            /usr/lib/apache/mod_proxy.so
#LoadModule proxy_ajp_module        /usr/lib/apache/mod_proxy_ajp.so
#LoadModule proxy_balancer_module   /usr/lib/apache/mod_proxy_balancer.so
#LoadModule proxy_connect_module    /usr/lib/apache/mod_proxy_connect.so
#LoadModule proxy_ftp_module        /usr/lib/apache/mod_proxy_ftp.so
#LoadModule proxy_http_module       /usr/lib/apache/mod_proxy_http.so
LoadModule rewrite_module           /usr/lib/apache/mod_rewrite.so
LoadModule setenvif_module          /usr/lib/apache/mod_setenvif.so
LoadModule speling_module           /usr/lib/apache/mod_speling.so
#LoadModule status_module           /usr/lib/apache/mod_status.so
#LoadModule unique_id_module        /usr/lib/apache/mod_unique_id.so
LoadModule userdir_module           /usr/lib/apache/mod_userdir.so
#LoadModule usertrack_module        /usr/lib/apache/mod_usertrack.so
#LoadModule version_module          /usr/lib/apache/mod_version.so
#LoadModule vhost_alias_module      /usr/lib/apache/mod_vhost_alias.so
#LoadModule cache_module            /usr/lib/apache/mod_cache.so
#LoadModule disk_cache_module       /usr/lib/apache/mod_disk_cache.so
#LoadModule mem_cache_module        /usr/lib/apache/mod_mem_cache.so



ErrorLog /var/log/httpd/error_log

# LogLevel: Ilosc informacji generowana w logach.
# Do wyboru sa opcje: debug, info, notice, warn, error, crit,
# alert, emerg.
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

CustomLog /var/log/httpd/access_log common

ServerTokens Prod

# Wyswietlana sygnaturka
ServerSignature EMail

Alias /icons/ "/home/httpd/icons/"

<Directory "/home/httpd/icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
ScriptAlias /cgi-bin/ "/home/httpd/cgi-bin/"

<Directory "/home/httpd/cgi-bin">
    AllowOverride None  
    Options None
    DefaultType text/html
    Order allow,deny
    Allow from all
</Directory>

IndexOptions FancyIndexing VersionSort

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

ReadmeName README.html
HeaderName HEADER.html

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

AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .et
AddLanguage fr .fr
AddLanguage de .de
AddLanguage he .he
AddLanguage el .el
AddLanguage it .it
AddLanguage ja .ja
AddLanguage pl .po
AddLanguage ko .ko
AddLanguage pt .pt
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pt-br .pt-br
AddLanguage ltz .ltz
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .sv
AddLanguage cs .cz .cs
AddLanguage ru .ru
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw
AddLanguage hr .hr

LanguagePriority pl en da nl et fr de el it ja ko no pt pt-br ltz ca es sv tw
ForceLanguagePriority Prefer Fallback

# AddDefaultCharset ISO-8859-2

AddCharset ISO-8859-1  .iso8859-1  .latin1
AddCharset ISO-8859-2  .iso8859-2  .latin2 .cen
AddCharset ISO-8859-3  .iso8859-3  .latin3
AddCharset ISO-8859-4  .iso8859-4  .latin4
AddCharset ISO-8859-5  .iso8859-5  .latin5 .cyr .iso-ru
AddCharset ISO-8859-6  .iso8859-6  .latin6 .arb
AddCharset ISO-8859-7  .iso8859-7  .latin7 .grk
AddCharset ISO-8859-8  .iso8859-8  .latin8 .heb
AddCharset ISO-8859-9  .iso8859-9  .latin9 .trk
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5        .Big5       .big5
AddCharset WINDOWS-1251 .cp-1251   .win-1251
AddCharset CP866       .cp866
AddCharset KOI8-r      .koi8-r .koi8-ru
AddCharset KOI8-ru     .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-8       .utf8
AddCharset GB2312      .gb2312 .gb
AddCharset utf-7       .utf7
AddCharset utf-8       .utf8
AddCharset big5        .big5 .b5
AddCharset EUC-TW      .euc-tw
AddCharset EUC-JP      .euc-jp
AddCharset EUC-KR      .euc-kr
AddCharset shift_jis   .sjis

AddType application/x-tar .tgz
AddType image/x-icon .ico

AddHandler type-map var

    Alias /error/ "/home/httpd/error/"

 <Directory "/home/httpd/error">
        AllowOverride None
        Options IncludesNoExec
        AddOutputFilter Includes html
        AddHandler type-map var
        Order allow,deny
        Allow from all
        LanguagePriority pl en cs de es fr it nl sv pt-br ro
        ForceLanguagePriority Prefer Fallback
	DefaultType text/html
</Directory>

    ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
    ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
    ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
    ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
    ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
    ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
    ErrorDocument 410 /error/HTTP_GONE.html.var
    ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
    ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
    ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
    ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
    ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
    ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
    ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
    ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
    ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
    ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var

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 "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully

#
# Obs�uga SSL
#
# Je�eli chcesz uzywac ssl odkomentuj poni�sz� linie, a po dalsze instrukcje
# zajrzyj do pliku /etc/httpd/conf/ssl.conf
# Include /etc/httpd/conf/ssl.conf

#
# Obs�uga Virtualnych Host�w
#
# Jezeli chcesz uzywac wirtualne hosty, odkomentuj poni�sz� linie, 
# nast�pnie zajrzyj do do pliku /etc/httpd/conf/vhosts.conf
#Include /etc/httpd/conf/vhosts.conf

#
# Obsluga php
#
# Jezeli chcesz u�ywac php, odkomentuj poni�sz� linie a nast�pnie zajrzyj
# do pliku /etc/httpd/conf/php.conf 
Include /etc/httpd/conf/php.conf

