Apache/ php-configuration

ok, ive insatlled apache2,0,52 on windows
the “[FONT=Book Antiqua]http://localhost/index.html.de[/FONT]” works

the next step was to configure the apache web server for php by editing the [FONT=Book Antiqua]http.conf[/FONT] data; i added

[FONT=Book Antiqua]ScriptAlias /php/ “c:/php/”
AddType application/x-httpd-php .php
Action application/x-httpd-php “/php/php.exe”[/FONT]
at the bottom,
then i created a [FONT=Book Antiqua]phpinfo.php
[/FONT]
[FONT=Book Antiqua][FONT=Verdana][FONT=Book Antiqua]<?
phpinfo();
?>[[/FONT][/FONT][/FONT]
[FONT=Book Antiqua][FONT=Verdana]
and saved it in [FONT=Book Antiqua]…/htdocs

[FONT=Verdana]now, when im trying to load “[FONT=Book Antiqua]http://localhost/phpinfo.php[/FONT]” it just keeps loading and dont stops, and the site doesnt appear

i hope someone can help me,
thx

[/FONT][/FONT][/FONT][/FONT]

The apache software… Did you download the Xampp?? Because if you did in the address bar type http://localhost/ and phpinfo should be in the navbar

http://h.selfip.com/pic.jpg

(on my server)

Ok were did you place the

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"

because it’s working fine with me on my server here

i placed it at the bottom of the [FONT=Book Antiqua]http.conf [FONT=Verdana]data of apache[/FONT][/FONT]

after the

#endif    /* !APACHE_HTTP_CONFIG_H */ 

?

there is no #endif in my conf

oh dear there is something wrong with your config. Have you deleted any of it to add the php code??

no
i put the [FONT=Book Antiqua]ScriptAlias[/FONT] etc. now in other places and now it shows
[FONT=Book Antiqua]<?php
phpinfo();
?>[/FONT]
in the browser
the strange thing is, it once worked perfect, but i deleted all because i wanted to update from mysql4 to mysql 5, and then nothing worked anymore
idont know if it helps but i post my config

Based upon the NCSA server configuration files originally by Rob McCool.

This is the main Apache server configuration file. It contains the

configuration directives that give the server its instructions.

See <URL:http://httpd.apache.org/docs-2.0/&gt; for detailed information about

the directives.

Do NOT simply read the instructions in here without understanding

what they do. They’re here only as hints or reminders. If you are unsure

consult the online docs. You have been warned.

The configuration directives are grouped into three basic sections:

1. Directives that control the operation of the Apache server process as a

whole (the ‘global environment’).

2. Directives that define the parameters of the ‘main’ or ‘default’ server,

which responds to requests that aren’t handled by a virtual host.

These directives also provide default values for the settings

of all virtual hosts.

3. Settings for virtual hosts, which allow Web requests to be sent to

different IP addresses or hostnames and have them handled by the

same Apache server process.

Configuration and logfile names: If the filenames you specify for many

of the server’s control files begin with “/” (or “drive:/” for Win32), the

server will use that explicit path. If the filenames do not begin

with “/”, the value of ServerRoot is prepended – so “logs/foo.log”

with ServerRoot set to “C:/Apache Group/Apache2” will be interpreted by the

server as “C:/Apache Group/Apache2/logs/foo.log”.

NOTE: Where filenames are specified, you must use forward slashes

instead of backslashes (e.g., “c:/apache” instead of “c:\apache”).

If a drive letter is omitted, the drive on which Apache.exe is located

will be used by default. It is recommended that you always supply

an explicit drive letter in absolute paths, however, to avoid

confusion.

Section 1: Global Environment

The directives in this section affect the overall operation of Apache,

such as the number of concurrent requests it can handle or where it

can find its configuration files.

ServerRoot: The top of the directory tree under which the server’s

configuration, error, and log files are kept.

NOTE! If you intend to place this on an NFS (or otherwise network)

mounted filesystem then please read the LockFile documentation (available

at <URL:mpm_common - Apache HTTP Server);

you will save yourself a lot of trouble.

Do NOT add a slash at the end of the directory path.

ServerRoot “C:/Apache Group/Apache2”

ScoreBoardFile: File used to store internal server process information.

If unspecified (the default), the scoreboard will be stored in an

anonymous shared memory segment, and will be unavailable to third-party

applications.

If specified, ensure that no two invocations of Apache share the same

scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.

#ScoreBoardFile logs/apache_runtime_status

PidFile: The file in which the server should record its process

identification number when it starts.

PidFile logs/httpd.pid

Timeout: The number of seconds before receives and sends time out.

Timeout 300

KeepAlive: Whether or not to allow persistent connections (more than

one request per connection). Set to “Off” to deactivate.

KeepAlive On

MaxKeepAliveRequests: The maximum number of requests to allow

during a persistent connection. Set to 0 to allow an unlimited amount.

We recommend you leave this number high, for maximum performance.

MaxKeepAliveRequests 100

KeepAliveTimeout: Number of seconds to wait for the next request from the

same client on the same connection.

KeepAliveTimeout 15

Server-Pool Size Regulation (MPM specific)

WinNT MPM

ThreadsPerChild: constant number of worker threads in the server process

MaxRequestsPerChild: maximum number of requests a server process serves

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

Listen: Allows you to bind Apache to specific IP addresses and/or

ports, instead of the default. See also the <VirtualHost>

directive.

Change this to Listen on specific IP addresses as shown below to

prevent Apache from glomming onto all bound IP addresses (0.0.0.0)

#Listen 12.34.56.78:80
Listen 80

Dynamic Shared Object (DSO) Support

To be able to use the functionality of a module which was built as a DSO you

have to place corresponding `LoadModule’ lines at this location so the

directives contained in it are actually available before they are used.

Statically compiled modules (those listed by `httpd -l’) do not need

to be loaded here.

Example:

LoadModule foo_module modules/mod_foo.so

LoadModule access_module modules/mod_access.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_module modules/mod_auth.so
#LoadModule auth_anon_module modules/mod_auth_anon.so
#LoadModule auth_dbm_module modules/mod_auth_dbm.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule headers_module modules/mod_headers.so
LoadModule imap_module modules/mod_imap.so
LoadModule include_module modules/mod_include.so
#LoadModule info_module modules/mod_info.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 mime_magic_module modules/mod_mime_magic.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule negotiation_module modules/mod_negotiation.so
#LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule status_module modules/mod_status.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 vhost_alias_module modules/mod_vhost_alias.so
#LoadModule ssl_module modules/mod_ssl.so

ExtendedStatus controls whether Apache will generate “full” status

information (ExtendedStatus On) or just basic information (ExtendedStatus

Off) when the “server-status” handler is called. The default is Off.

#ExtendedStatus On

Section 2: ‘Main’ server configuration

The directives in this section set up the values used by the ‘main’

server, which responds to any requests that aren’t handled by a

<VirtualHost> definition. These values also provide defaults for

any <VirtualHost> containers you may define later in the file.

All of these directives may appear inside <VirtualHost> containers,

in which case these default settings will be overridden for the

virtual host being defined.

ServerAdmin: Your address, where problems with the server should be

e-mailed. This address appears on some server-generated pages, such

as error documents. e.g. admin@your-domain.com

ServerAdmin ex@exossho.com

ServerName gives the name and port that the server uses to identify itself.

This can often be determined automatically, but we recommend you specify

it explicitly to prevent problems during startup.

If this is not set to valid DNS name for your host, server-generated

redirections will not work. See also the UseCanonicalName directive.

If your host doesn’t have a registered DNS name, enter its IP address here.

You will have to access it by its address anyway, and this will make

redirections work in a sensible way.

ServerName www.exossho.com:80

UseCanonicalName: Determines how Apache constructs self-referencing

URLs and the SERVER_NAME and SERVER_PORT variables.

When set “Off”, Apache will use the Hostname and Port supplied

by the client. When set “On”, Apache will use the value of the

ServerName directive.

UseCanonicalName Off

DocumentRoot: The directory out of which you will serve your

documents. By default, all requests are taken from this directory, but

symbolic links and aliases may be used to point to other locations.

DocumentRoot “C:/Apache Group/Apache2/htdocs”

Each directory to which Apache has access can be configured with respect

to which services and features are allowed and/or disabled in that

directory (and its subdirectories).

First, we configure the “default” to be a very restrictive set of

features.

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

Note that from this point forward you must specifically allow

particular features to be enabled - so if something’s not working as

you might expect, make sure that you have specifically enabled it

below.

This should be changed to whatever you set DocumentRoot to.

<Directory “C:/Apache Group/Apache2/htdocs”>

Possible values for the Options directive are “None”, “All”,

or any combination of:

Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews

Note that “MultiViews” must be named explicitly — “Options All”

doesn’t give it to you.

The Options directive is both complicated and important. Please see

http://httpd.apache.org/docs-2.0/mod/core.html#options

for more information.

Options Indexes FollowSymLinks

AllowOverride controls what directives may be placed in .htaccess files.

It can be “All”, “None”, or any combination of the keywords:

Options FileInfo AuthConfig Limit

AllowOverride None

Controls who can get stuff from this server.

Order allow,deny
Allow from all

</Directory>

UserDir: The name of the directory that is appended onto a user’s home

directory if a ~user request is received. Be especially careful to use

proper, forward slashes here. On Windows NT, “Personal/My Website”

is a more appropriate choice.

UserDir “My Documents/My Website”

Control access to UserDir directories. The following is an example

for a site where these directories are restricted to read-only.

You must correct the path for the root to match your system’s configured

user directory location, e.g. “C:/WinNT/profiles/*/My Documents/My Website”

or whichever, as appropriate.

#<Directory “C:/Documents and Settings/*/My Documents/My Website”>

AllowOverride FileInfo AuthConfig Limit

Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec

<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>

DirectoryIndex: sets the file that Apache will serve if a directory

is requested.

The index.html.var file (a type-map) is used to deliver content-

negotiated documents. The MultiViews Option can be used for the

same purpose, but it is much slower.

DirectoryIndex index.html index.html.var

AccessFileName: The name of the file to look for in each directory

for additional configuration directives. See also the AllowOverride

directive.

AccessFileName .htaccess

The following lines prevent .htaccess and .htpasswd files from being

viewed by Web clients.

<Files ~ “^.ht”>
Order allow,deny
Deny from all
</Files>

TypesConfig describes where the mime.types file (or equivalent) is

to be found.

TypesConfig conf/mime.types

DefaultType is the default MIME type the server will use for a document

if it cannot otherwise determine one, such as from filename extensions.

If your server contains mostly text or HTML documents, “text/plain” is

a good value. If most of your content is binary, such as applications

or images, you may want to use “application/octet-stream” instead to

keep browsers from trying to display binary files as though they are

text.

DefaultType text/plain

The mod_mime_magic module allows the server to use various hints from the

contents of the file itself to determine its type. The MIMEMagicFile

directive tells the module where the hint definitions are located.

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

HostnameLookups: Log the names of clients or just their IP addresses

e.g., www.apache.org (on) or 204.62.129.132 (off).

The default is off because it’d be overall better for the net if people

had to knowingly turn this feature on, since enabling it means that

each client request will result in AT LEAST one lookup request to the

nameserver.

HostnameLookups Off

EnableMMAP: Control whether memory-mapping is used to deliver

files (assuming that the underlying OS supports it).

The default is on; turn this off if you serve from NFS-mounted

filesystems. On some systems, turning it off (regardless of

filesystem) can improve performance; for details, please see

http://httpd.apache.org/docs-2.0/mod/core.html#enablemmap

#EnableMMAP off

EnableSendfile: Control whether the sendfile kernel support is

used to deliver files (assuming that the OS supports it).

The default is on; turn this off if you serve from NFS-mounted

filesystems. Please see

http://httpd.apache.org/docs-2.0/mod/core.html#enablesendfile

#EnableSendfile off

ErrorLog: The location of the error log file.

If you do not specify an ErrorLog directive within a <VirtualHost>

container, error messages relating to that virtual host will be

logged here. If you do define an error logfile for a <VirtualHost>

container, that host’s errors will be logged there and not here.

ErrorLog logs/error.log

LogLevel: Control the number of messages logged to the error.log.

Possible values include: debug, info, notice, warn, error, crit,

alert, emerg.

LogLevel warn

The following directives define some format nicknames for use with

a CustomLog directive (see below).

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

You need to enable mod_logio.c to use %I and %O

#LogFormat “%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %I %O” combinedio

The location and format of the access logfile (Common Logfile Format).

If you do not define any access logfiles within a <VirtualHost>

container, they will be logged here. Contrariwise, if you do

define per-<VirtualHost> access logfiles, transactions will be

logged therein and not in this file.

CustomLog logs/access.log common

If you would like to have agent and referer logfiles, uncomment the

following directives.

#CustomLog logs/referer.log referer
#CustomLog logs/agent.log agent

If you prefer a single logfile with access, agent, and referer information

(Combined Logfile Format) you can use the following directive.

#CustomLog logs/access.log combined

ServerTokens

This directive configures what you return as the Server HTTP response

Header. The default is ‘Full’ which sends information about the OS-Type

and compiled in modules.

Set to one of: Full | OS | Minor | Minimal | Major | Prod

where Full conveys the most information, and Prod the least.

ServerTokens Full

Optionally add a line containing the server version and virtual host

name to server-generated pages (internal error documents, FTP directory

listings, mod_status and mod_info output etc., but not CGI generated

documents or custom error documents).

Set to “EMail” to also include a mailto: link to the ServerAdmin.

Set to one of: On | Off | EMail

ServerSignature On

Aliases: Add here as many aliases as you need (with no limit). The format is

Alias fakename realname

Note that if you include a trailing / on fakename then the server will

require it to be present in the URL. So “/icons” isn’t aliased in this

example, only “/icons/”. If the fakename is slash-terminated, then the

realname must also be slash terminated, and if the fakename omits the

trailing slash, the realname must also omit it.

We include the /icons/ alias for FancyIndexed directory listings. If you

do not use FancyIndexing, you may comment this out.

Alias /icons/ “C:/Apache Group/Apache2/icons/”

<Directory “C:/Apache Group/Apache2/icons”>
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

This should be changed to the ServerRoot/manual/. The alias provides

the manual, even if you choose to move your DocumentRoot. You may comment

this out if you do not care for the documentation.

AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ “C:/Apache Group/Apache2/manual$1”

<Directory “C:/Apache Group/Apache2/manual”>
Options Indexes
AllowOverride None
Order allow,deny
Allow from all

&lt;Files *.html&gt;
    SetHandler type-map
&lt;/Files&gt;

SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|ru)/ prefer-language=$1
RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2

</Directory>

ScriptAlias: This controls which directories contain server scripts.

ScriptAliases are essentially the same as Aliases, except that

documents in the realname directory are treated as applications and

run by the server when requested rather than as documents sent to the client.

The same rules about trailing “/” apply to ScriptAlias directives as to

Alias.

ScriptAlias /cgi-bin/ “C:/Apache Group/Apache2/cgi-bin/”
[COLOR=Red]#ScriptAlias /php/ “C:/php/”[/COLOR]

“C:/Apache Group/Apache2/cgi-bin” should be changed to whatever your ScriptAliased

CGI directory exists, if you have that configured.

<Directory “C:/Apache Group/Apache2/cgi-bin”>
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

Redirect allows you to tell clients about documents which used to exist in

your server’s namespace, but do not anymore. This allows you to tell the

clients where to look for the relocated document.

Example:

Redirect permanent /foo http://www.example.com/bar

Directives controlling the display of server-generated directory listings.

IndexOptions: Controls the appearance of server-generated directory

listings.

IndexOptions FancyIndexing VersionSort

AddIcon* directives tell the server which icon to show for different

files or filename extensions. These are only displayed for

FancyIndexed directories.

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 is which icon to show for files which do not have an icon

explicitly set.

DefaultIcon /icons/unknown.gif

AddDescription allows you to place a short description after a file in

server-generated indexes. These are only displayed for FancyIndexed

directories.

Format: AddDescription “description” filename

#AddDescription “GZIP compressed document” .gz
#AddDescription “tar archive” .tar
#AddDescription “GZIP compressed tar archive” .tgz

ReadmeName is the name of the README file the server will look for by

default, and append to directory listings.

HeaderName is the name of a file which should be prepended to

directory indexes.

ReadmeName README.html
HeaderName HEADER.html

IndexIgnore is a set of filenames which directory indexing should ignore

and not include in the listing. Shell-style wildcarding is permitted.

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

DefaultLanguage and AddLanguage allows you to specify the language of

a document. You can then use content negotiation to give a browser a

file in a language the user can understand.

Specify a default language. This means that all data

going out without a specific language tag (see below) will

be marked with this one. You probably do NOT want to set

this unless you are sure it is correct for all cases.

* It is generally better to not mark a page as

* being a certain language than marking it with the wrong

* language!

DefaultLanguage nl

Note 1: The suffix does not have to be the same as the language

keyword — those with documents in Polish (whose net-standard

language code is pl) may wish to use “AddLanguage pl .po” to

avoid the ambiguity with the common suffix for perl scripts.

Note 2: The example entries below illustrate that in some cases

the two character ‘Language’ abbreviation is not identical to

the two character ‘Country’ code for its country,

E.g. ‘Danmark/dk’ versus ‘Danish/da’.

Note 3: In the case of ‘ltz’ we violate the RFC by using a three char

specifier. There is ‘work in progress’ to fix this and get

the reference data for rfc1766 cleaned up.

Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)

English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)

Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)

Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)

Norwegian (no) - Polish (pl) - Portugese (pt)

Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)

Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)

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

LanguagePriority allows you to give precedence to some languages

in case of a tie during content negotiation.

Just list the languages in decreasing order of preference. We have

more or less alphabetized them here. You probably want to change this.

LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW

ForceLanguagePriority allows you to serve a result page rather than

MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)

[in case no accepted languages matched the available variants]

ForceLanguagePriority Prefer Fallback

Specify a default charset for all pages sent out. This is

always a good idea and opens the door for future internationalisation

of your web site, should you ever want it. Specifying it as

a default does little harm; as the standard dictates that a page

is in iso-8859-1 (latin1) unless specified otherwise i.e. you

are merely stating the obvious. There are also some security

reasons in browsers, related to javascript and URL parsing

which encourage you to always set a default char set.

AddDefaultCharset ISO-8859-1

Commonly used filename extensions to character sets. You probably

want to avoid clashes with the language extensions, unless you

are good at carefully testing your setup after each change.

See http://www.iana.org/assignments/character-sets for the

official list of charset names and their respective RFCs.

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

For russian, more than one charset is used (depends on client, mostly):

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

The set below does not map to a specific (iso) standard

but works on a fairly wide range of browsers. Note that

capitalization actually matters (it should not, but it

does for some browsers).

See http://www.iana.org/assignments/character-sets

for a list of sorts. But browsers support few.

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 allows you to add to or override the MIME configuration

file mime.types for specific file types.

#AddType application/x-tar .tgz
[COLOR=Red] #AddType application/x-httpd-php .php
#AddType application/x-httpd-php-source.phps[/COLOR]

AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress

information on the fly. Note: Not all browsers support this.

Despite the name similarity, the following Add* directives have nothing

to do with the FancyIndexing customization directives above.

#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz

If the AddEncoding directives above are commented-out, then you

probably should define those extensions to indicate media types:

AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

AddHandler allows you to map certain file extensions to “handlers”:

actions unrelated to filetype. These can be either built into the server

or added with the Action directive (see below)

To use CGI scripts outside of ScriptAliased directories:

(You will also need to add “ExecCGI” to the “Options” directive.)

#AddHandler cgi-script .cgi

For files that include their own HTTP headers:

#AddHandler send-as-is asis

For server-parsed imagemap files:

#AddHandler imap-file map

For type maps (negotiated resources):

(This is enabled by default to allow the Apache “It Worked” page

to be distributed in multiple languages.)

AddHandler type-map var

Filters allow you to process content before it is sent to the client.

To parse .shtml files for server-side includes (SSI):

(You will also need to add “Includes” to the “Options” directive.)

#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml

Action lets you define media types that will execute a script whenever

a matching file is called. This eliminates the need for repeated URL

pathnames for oft-used CGI file processors.

Format: Action media/type /cgi-script/location

Format: Action handler-name /cgi-script/location

[COLOR=Red]#Action application/x-httpd-php /php/php.exe[/COLOR]

Customizable error responses come in three flavors:

1) plain text 2) local redirects 3) external redirects

Some examples:

#ErrorDocument 500 “The server made a boo boo.”
#ErrorDocument 404 /missing.html
#ErrorDocument 404 “/cgi-bin/missing_handler.pl”
#ErrorDocument 402 http://www.example.com/subscription_info.html

Putting this all together, we can internationalize error responses.

We use Alias to redirect any /error/HTTP_<error>.html.var response to

our collection of by-error message multi-language collections. We use

includes to substitute the appropriate text.

You can modify the messages’ appearance without changing any of the

default HTTP_<error>.html.var files by adding the line:

Alias /error/include/ “/your/include/path/”

which allows you to create your own set of files by starting with the

@exp_errordir@/include/ files and copying them to /your/include/path/,

even on a per-VirtualHost basis. The default include files will display

your Apache version number and your ServerAdmin email address regardless

of the setting of ServerSignature.

The internationalized error documents require mod_alias, mod_include

and mod_negotiation. To activate them, uncomment the following 30 lines.

Alias /error/ “@exp_errordir@/”

<Directory “@exp_errordir@”>

AllowOverride None

Options IncludesNoExec

AddOutputFilter Includes html

AddHandler type-map var

Order allow,deny

Allow from all

LanguagePriority en cs de es fr it nl sv pt-br ro

ForceLanguagePriority Prefer Fallback

</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

The following directives modify normal HTTP response behavior to

handle known problems with browser implementations.

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

The following directive disables redirects on non-GET requests for

a directory that does not include the trailing slash. This fixes a

problem with Microsoft WebFolders which does not appropriately handle

redirects for folders with DAV methods.

Same deal with Apple’s DAV filesystem and Gnome VFS support for DAV.

BrowserMatch “Microsoft Data Access Internet Publishing Provider” redirect-carefully
BrowserMatch “^WebDrive” redirect-carefully
BrowserMatch “^WebDAVFS/1.[012]” redirect-carefully
BrowserMatch “^gnome-vfs” redirect-carefully

Allow server status reports generated by mod_status,

with the URL of http://servername/server-status

Change the “.exossho.com” to match your domain to enable.

#<Location /server-status>

SetHandler server-status

Order deny,allow

Deny from all

Allow from .exossho.com

#</Location>

Allow remote server configuration reports, with the URL of

http://servername/server-info (requires that mod_info.c be loaded).

Change the “.exossho.com” to match your domain to enable.

#<Location /server-info>

SetHandler server-info

Order deny,allow

Deny from all

Allow from .exossho.com

#</Location>

Bring in additional module-specific configurations

<IfModule mod_ssl.c>
Include conf/ssl.conf
</IfModule>

Section 3: Virtual Hosts

VirtualHost: If you want to maintain multiple domains/hostnames on your

machine you can setup VirtualHost containers for them. Most configurations

use only name-based virtual hosts so the server doesn’t need to worry about

IP addresses. This is indicated by the asterisks in the directives below.

Please see the documentation at

<URL:http://httpd.apache.org/docs-2.0/vhosts/&gt;

for further details before you try to setup virtual hosts.

You may use the command line option ‘-S’ to verify your virtual host

configuration.

Use name-based virtual hosting.

#NameVirtualHost *:80

VirtualHost example:

Almost any Apache directive may go into a VirtualHost container.

The first VirtualHost section is used for requests without a known

server name.

#<VirtualHost *:80>

ServerAdmin webmaster@dummy-host.example.com

DocumentRoot /www/docs/dummy-host.example.com

ServerName dummy-host.example.com

ErrorLog logs/dummy-host.example.com-error_log

CustomLog logs/dummy-host.example.com-access_log common

#</VirtualHost>#

Ok please supply the link you recived the apache file from

i got apache from a cd

is it XAMPP

My config:

/* Copyright 1999-2005 The Apache Software Foundation or its licensors, as
 * applicable.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef APACHE_HTTP_CONFIG_H
#define APACHE_HTTP_CONFIG_H

#include "apr_hooks.h"
#include "util_cfgtree.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @file http_config.h
 * @brief Apache Configuration
 */

/*
 * The central data structures around here...
 */

/* Command dispatch structures... */

/**
 * How the directives arguments should be parsed.
 * @remark Note that for all of these except RAW_ARGS, the config routine is
 *      passed a freshly allocated string which can be modified or stored
 *      or whatever...
 */
enum cmd_how {
    RAW_ARGS,			/**&lt; cmd_func parses command line itself */
    TAKE1,			/**&lt; one argument only */
    TAKE2,			/**&lt; two arguments only */
    ITERATE,			/**&lt; one argument, occuring multiple times
				 * (e.g., IndexIgnore)
				 */
    ITERATE2,			/**&lt; two arguments, 2nd occurs multiple times
				 * (e.g., AddIcon)
				 */
    FLAG,			/**&lt; One of 'On' or 'Off' */
    NO_ARGS,			/**&lt; No args at all, e.g. &lt;/Directory&gt; */
    TAKE12,			/**&lt; one or two arguments */
    TAKE3,			/**&lt; three arguments only */
    TAKE23,			/**&lt; two or three arguments */
    TAKE123,			/**&lt; one, two or three arguments */
    TAKE13			/**&lt; one or three arguments */
};
/**
 * This structure is passed to a command which is being invoked,
 * to carry a large variety of miscellaneous data which is all of
 * use to *somebody*...
 */
typedef struct cmd_parms_struct cmd_parms;

#if defined(AP_HAVE_DESIGNATED_INITIALIZER) || defined(DOXYGEN)

/** 
 * All the types of functions that can be used in directives
 * @internal
 */
typedef union {
    /** function to call for a no-args */
    const char *(*no_args) (cmd_parms *parms, void *mconfig);
    /** function to call for a raw-args */
    const char *(*raw_args) (cmd_parms *parms, void *mconfig,
			     const char *args);
    /** function to call for a take1 */
    const char *(*take1) (cmd_parms *parms, void *mconfig, const char *w);
    /** function to call for a take2 */
    const char *(*take2) (cmd_parms *parms, void *mconfig, const char *w,
			  const char *w2);
    /** function to call for a take3 */
    const char *(*take3) (cmd_parms *parms, void *mconfig, const char *w,
			  const char *w2, const char *w3);
    /** function to call for a flag */
    const char *(*flag) (cmd_parms *parms, void *mconfig, int on);
} cmd_func;

/** This configuration directive does not take any arguments */
# define AP_NO_ARGS	func.no_args
/** This configuration directive will handle it's own parsing of arguments*/
# define AP_RAW_ARGS	func.raw_args
/** This configuration directive takes 1 argument*/
# define AP_TAKE1	func.take1
/** This configuration directive takes 2 arguments */
# define AP_TAKE2	func.take2
/** This configuration directive takes 3 arguments */
# define AP_TAKE3	func.take3
/** This configuration directive takes a flag (on/off) as a argument*/
# define AP_FLAG	func.flag

/** method of declaring a directive with no arguments */
# define AP_INIT_NO_ARGS(directive, func, mconfig, where, help) \
    { directive, { .no_args=func }, mconfig, where, RAW_ARGS, help }
/** method of declaring a directive with raw argument parsing */
# define AP_INIT_RAW_ARGS(directive, func, mconfig, where, help) \
    { directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help }
/** method of declaring a directive which takes 1 argument */
# define AP_INIT_TAKE1(directive, func, mconfig, where, help) \
    { directive, { .take1=func }, mconfig, where, TAKE1, help }
/** method of declaring a directive which takes multiple arguments */
# define AP_INIT_ITERATE(directive, func, mconfig, where, help) \
    { directive, { .take1=func }, mconfig, where, ITERATE, help }
/** method of declaring a directive which takes 2 arguments */
# define AP_INIT_TAKE2(directive, func, mconfig, where, help) \
    { directive, { .take2=func }, mconfig, where, TAKE2, help }
/** method of declaring a directive which takes 1 or 2 arguments */
# define AP_INIT_TAKE12(directive, func, mconfig, where, help) \
    { directive, { .take2=func }, mconfig, where, TAKE12, help }
/** method of declaring a directive which takes multiple 2 arguments */
# define AP_INIT_ITERATE2(directive, func, mconfig, where, help) \
    { directive, { .take2=func }, mconfig, where, ITERATE2, help }
/** method of declaring a directive which takes 1 or 3 arguments */
# define AP_INIT_TAKE13(directive, func, mconfig, where, help) \
    { directive, { .take3=func }, mconfig, where, TAKE13, help }
/** method of declaring a directive which takes 2 or 3 arguments */
# define AP_INIT_TAKE23(directive, func, mconfig, where, help) \
    { directive, { .take3=func }, mconfig, where, TAKE23, help }
/** method of declaring a directive which takes 1 to 3 arguments */
# define AP_INIT_TAKE123(directive, func, mconfig, where, help) \
    { directive, { .take3=func }, mconfig, where, TAKE123, help }
/** method of declaring a directive which takes 3 arguments */
# define AP_INIT_TAKE3(directive, func, mconfig, where, help) \
    { directive, { .take3=func }, mconfig, where, TAKE3, help }
/** method of declaring a directive which takes a flag (on/off) as a argument*/
# define AP_INIT_FLAG(directive, func, mconfig, where, help) \
    { directive, { .flag=func }, mconfig, where, FLAG, help }

#else /* AP_HAVE_DESIGNATED_INITIALIZER */

typedef const char *(*cmd_func) ();

# define AP_NO_ARGS  func
# define AP_RAW_ARGS func
# define AP_TAKE1    func
# define AP_TAKE2    func
# define AP_TAKE3    func
# define AP_FLAG     func

# define AP_INIT_NO_ARGS(directive, func, mconfig, where, help) \
    { directive, func, mconfig, where, RAW_ARGS, help }
# define AP_INIT_RAW_ARGS(directive, func, mconfig, where, help) \
    { directive, func, mconfig, where, RAW_ARGS, help }
# define AP_INIT_TAKE1(directive, func, mconfig, where, help) \
    { directive, func, mconfig, where, TAKE1, help }
# define AP_INIT_ITERATE(directive, func, mconfig, where, help) \
    { directive, func, mconfig, where, ITERATE, help }
# define AP_INIT_TAKE2(directive, func, mconfig, where, help) \
    { directive, func, mconfig, where, TAKE2, help }
# define AP_INIT_TAKE12(directive, func, mconfig, where, help) \
    { directive, func, mconfig, where, TAKE12, help }
# define AP_INIT_ITERATE2(directive, func, mconfig, where, help) \
    { directive, func, mconfig, where, ITERATE2, help }
# define AP_INIT_TAKE13(directive, func, mconfig, where, help) \
    { directive, func, mconfig, where, TAKE13, help }
# define AP_INIT_TAKE23(directive, func, mconfig, where, help) \
    { directive, func, mconfig, where, TAKE23, help }
# define AP_INIT_TAKE123(directive, func, mconfig, where, help) \
    { directive, func, mconfig, where, TAKE123, help }
# define AP_INIT_TAKE3(directive, func, mconfig, where, help) \
    { directive, func, mconfig, where, TAKE3, help }
# define AP_INIT_FLAG(directive, func, mconfig, where, help) \
    { directive, func, mconfig, where, FLAG, help }

#endif /* AP_HAVE_DESIGNATED_INITIALIZER */

/**
 * The command record structure.  Each modules can define a table of these
 * to define the directives it will implement.
 */
typedef struct command_struct command_rec; 
struct command_struct {
    /** Name of this command */
    const char *name;
    /** The function to be called when this directive is parsed */
    cmd_func func;
    /** Extra data, for functions which implement multiple commands... */
    void *cmd_data;		
    /** What overrides need to be allowed to enable this command. */
    int req_override;
    /** What the command expects as arguments 
     *  @defvar cmd_how args_how*/
    enum cmd_how args_how;

    /** 'usage' message, in case of syntax errors */
    const char *errmsg;
};

/**
 * @defgroup ConfigDirectives Allowed locations for configuration directives.
 *
 * The allowed locations for a configuration directive are the union of
 * those indicated by each set bit in the req_override mask.
 *
 * @{
 */
#define OR_NONE 0             /**&lt; *.conf is not available anywhere in this override */
#define OR_LIMIT 1	     /**&lt; *.conf inside &lt;Directory&gt; or &lt;Location&gt;
				and .htaccess when AllowOverride Limit */
#define OR_OPTIONS 2         /**&lt; *.conf anywhere
                                and .htaccess when AllowOverride Options */
#define OR_FILEINFO 4        /**&lt; *.conf anywhere
				and .htaccess when AllowOverride FileInfo */
#define OR_AUTHCFG 8         /**&lt; *.conf inside &lt;Directory&gt; or &lt;Location&gt;
				and .htaccess when AllowOverride AuthConfig */
#define OR_INDEXES 16        /**&lt; *.conf anywhere
				and .htaccess when AllowOverride Indexes */
#define OR_UNSET 32          /**&lt; unset a directive (in Allow) */
#define ACCESS_CONF 64       /**&lt; *.conf inside &lt;Directory&gt; or &lt;Location&gt; */
#define RSRC_CONF 128	     /**&lt; *.conf outside &lt;Directory&gt; or &lt;Location&gt; */
#define EXEC_ON_READ 256     /**&lt; force directive to execute a command 
                which would modify the configuration (like including another
                file, or IFModule */
/** this directive can be placed anywhere */
#define OR_ALL (OR_LIMIT|OR_OPTIONS|OR_FILEINFO|OR_AUTHCFG|OR_INDEXES)

/** @} */

/**
 * This can be returned by a function if they don't wish to handle
 * a command. Make it something not likely someone will actually use
 * as an error code.
 */
#define DECLINE_CMD "\a\b"

/** Common structure for reading of config files / passwd files etc. */
typedef struct ap_configfile_t ap_configfile_t;
struct ap_configfile_t {
    int (*getch) (void *param);	    /**&lt; a getc()-like function */
    void *(*getstr) (void *buf, size_t bufsiz, void *param);
				    /**&lt; a fgets()-like function */
    int (*close) (void *param);	    /**&lt; a close handler function */
    void *param;                    /**&lt; the argument passed to getch/getstr/close */
    const char *name;               /**&lt; the filename / description */
    unsigned line_number;           /**&lt; current line number, starting at 1 */
};

/**
 * This structure is passed to a command which is being invoked,
 * to carry a large variety of miscellaneous data which is all of
 * use to *somebody*...
 */
struct cmd_parms_struct {
    /** Argument to command from cmd_table */
    void *info;
    /** Which allow-override bits are set */
    int override;
    /** Which methods are &lt;Limit&gt;ed */
    apr_int64_t limited;
    /** methods which are limited */
    apr_array_header_t *limited_xmethods;
    /** methods which are xlimited */
    ap_method_list_t *xlimited;

    /** Config file structure. */
    ap_configfile_t *config_file;
    /** the directive specifying this command */
    ap_directive_t *directive;

    /** Pool to allocate new storage in */
    apr_pool_t *pool;
    /** Pool for scratch memory; persists during configuration, but 
     *  wiped before the first request is served...  */
    apr_pool_t *temp_pool;
    /** Server_rec being configured for */
    server_rec *server;
    /** If configuring for a directory, pathname of that directory.  
     *  NOPE!  That's what it meant previous to the existance of &lt;Files&gt;, 
     * &lt;Location&gt; and regex matching.  Now the only usefulness that can be 
     * derived from this field is whether a command is being called in a 
     * server context (path == NULL) or being called in a dir context 
     * (path != NULL).  */
    char *path;
    /** configuration command */
    const command_rec *cmd;

    /** per_dir_config vector passed to handle_command */
    struct ap_conf_vector_t *context;
    /** directive with syntax error */
    const ap_directive_t *err_directive;
};

/**
 * Module structures.  Just about everything is dispatched through
 * these, directly or indirectly (through the command and handler
 * tables).
 */
typedef struct module_struct module;
struct module_struct {
    /** API version, *not* module version; check that module is 
     * compatible with this version of the server.
     */
    int version;
    /** API minor version. Provides API feature milestones. Not checked 
     *  during module init */
    int minor_version;
    /** Index to this modules structures in config vectors.  */
    int module_index;

    /** The name of the module's C file */
    const char *name;
    /** The handle for the DSO.  Internal use only */
    void *dynamic_load_handle;

    /** A pointer to the next module in the list
     *  @defvar module_struct *next */
    struct module_struct *next;

    /** Magic Cookie to identify a module structure;  It's mainly 
     *  important for the DSO facility (see also mod_so).  */
    unsigned long magic;

    /** Function to allow MPMs to re-write command line arguments.  This
     *  hook is only available to MPMs.
     *  @param The process that the server is running in.
     */
    void (*rewrite_args) (process_rec *process);
    /** Function to allow all modules to create per directory configuration
     *  structures.
     *  @param p The pool to use for all allocations.
     *  @param dir The directory currently being processed.
     *  @return The per-directory structure created
     */
    void *(*create_dir_config) (apr_pool_t *p, char *dir);
    /** Function to allow all modules to merge the per directory configuration
     *  structures for two directories.
     *  @param p The pool to use for all allocations.
     *  @param base_conf The directory structure created for the parent directory.
     *  @param new_conf The directory structure currently being processed.
     *  @return The new per-directory structure created
     */
    void *(*merge_dir_config) (apr_pool_t *p, void *base_conf, void *new_conf);
    /** Function to allow all modules to create per server configuration
     *  structures.
     *  @param p The pool to use for all allocations.
     *  @param s The server currently being processed.
     *  @return The per-server structure created
     */
    void *(*create_server_config) (apr_pool_t *p, server_rec *s);
    /** Function to allow all modules to merge the per server configuration
     *  structures for two servers.
     *  @param p The pool to use for all allocations.
     *  @param base_conf The directory structure created for the parent directory.
     *  @param new_conf The directory structure currently being processed.
     *  @return The new per-directory structure created
     */
    void *(*merge_server_config) (apr_pool_t *p, void *base_conf, 
                                  void *new_conf);

    /** A command_rec table that describes all of the directives this module
     * defines. */
    const command_rec *cmds;

    /** A hook to allow modules to hook other points in the request processing.
     *  In this function, modules should call the ap_hook_*() functions to
     *  register an interest in a specific step in processing the current
     *  request.
     *  @param p the pool to use for all allocations
     */
    void (*register_hooks) (apr_pool_t *p);
};

/**
 * @defgroup ModuleInit Module structure initializers
 *
 * Initializer for the first few module slots, which are only
 * really set up once we start running.  Note that the first two slots
 * provide a version check; this should allow us to deal with changes to
 * the API. The major number should reflect changes to the API handler table
 * itself or removal of functionality. The minor number should reflect
 * additions of functionality to the existing API. (the server can detect
 * an old-format module, and either handle it back-compatibly, or at least
 * signal an error). See src/include/ap_mmn.h for MMN version history.
 * @{
 */

/** The one used in Apache 1.3, which will deliberately cause an error */
#define STANDARD_MODULE_STUFF	this_module_needs_to_be_ported_to_apache_2_0

/** Use this in all standard modules */
#define STANDARD20_MODULE_STUFF	MODULE_MAGIC_NUMBER_MAJOR, \
				MODULE_MAGIC_NUMBER_MINOR, \
				-1, \
				__FILE__, \
				NULL, \
				NULL, \
				MODULE_MAGIC_COOKIE, \
                                NULL      /* rewrite args spot */

/** Use this only in MPMs */
#define MPM20_MODULE_STUFF	MODULE_MAGIC_NUMBER_MAJOR, \
				MODULE_MAGIC_NUMBER_MINOR, \
				-1, \
				__FILE__, \
				NULL, \
				NULL, \
				MODULE_MAGIC_COOKIE

/** @} */

/* CONFIGURATION VECTOR FUNCTIONS */

/** configuration vector structure */
typedef struct ap_conf_vector_t ap_conf_vector_t;

/**
 * Generic accessors for other modules to get at their own module-specific
 * data
 * @param conf_vector The vector in which the modules configuration is stored.
 *        usually r-&gt;per_dir_config or s-&gt;module_config
 * @param m The module to get the data for.
 * @return The module-specific data
 */
AP_DECLARE(void *) ap_get_module_config(const ap_conf_vector_t *cv,
                                        const module *m);

/**
 * Generic accessors for other modules to set at their own module-specific
 * data
 * @param conf_vector The vector in which the modules configuration is stored.
 *        usually r-&gt;per_dir_config or s-&gt;module_config
 * @param m The module to set the data for.
 * @param val The module-specific data to set
 */
AP_DECLARE(void) ap_set_module_config(ap_conf_vector_t *cv, const module *m,
                                      void *val);

#if !defined(AP_DEBUG)

#define ap_get_module_config(v,m)	\
    (((void **)(v))[(m)-&gt;module_index])
#define ap_set_module_config(v,m,val)	\
    ((((void **)(v))[(m)-&gt;module_index]) = (val))

#endif /* AP_DEBUG */


/**
 * Generic command handling function for strings
 * @param cmd The command parameters for this directive
 * @param struct_ptr pointer into a given type
 * @param arg The argument to the directive
 * @return An error string or NULL on success
 */
AP_DECLARE_NONSTD(const char *) ap_set_string_slot(cmd_parms *cmd, 
                                                   void *struct_ptr,
                                                   const char *arg);

/**
 * Generic command handling function for integers
 * @param cmd The command parameters for this directive
 * @param struct_ptr pointer into a given type
 * @param arg The argument to the directive
 * @return An error string or NULL on success
 */
AP_DECLARE_NONSTD(const char *) ap_set_int_slot(cmd_parms *cmd, 
                                                void *struct_ptr,
                                                const char *arg);

/**
 * Return true if the specified method is limited by being listed in
 * a &lt;Limit&gt; container, or by *not* being listed in a &lt;LimiteExcept&gt;
 * container.
 *
 * @param   method  Pointer to a string specifying the method to check.
 * @param   cmd     Pointer to the cmd_parms structure passed to the
 *                  directive handler.
 * @return  0 if the method is not limited in the current scope
 */
AP_DECLARE(int) ap_method_is_limited(cmd_parms *cmd, const char *method);

/**
 * Generic command handling function for strings, always sets the value
 * to a lowercase string
 * @param cmd The command parameters for this directive
 * @param struct_ptr pointer into a given type
 * @param arg The argument to the directive
 * @return An error string or NULL on success
 */
AP_DECLARE_NONSTD(const char *) ap_set_string_slot_lower(cmd_parms *cmd, 
                                                         void *struct_ptr, 
                                                         const char *arg);
/**
 * Generic command handling function for flags
 * @param cmd The command parameters for this directive
 * @param struct_ptr pointer into a given type
 * @param arg The argument to the directive (either 1 or 0)
 * @return An error string or NULL on success
 */
AP_DECLARE_NONSTD(const char *) ap_set_flag_slot(cmd_parms *cmd, 
                                                 void *struct_ptr, 
                                                 int arg);
/**
 * Generic command handling function for files
 * @param cmd The command parameters for this directive
 * @param struct_ptr pointer into a given type
 * @param arg The argument to the directive
 * @return An error string or NULL on success
 */
AP_DECLARE_NONSTD(const char *) ap_set_file_slot(cmd_parms *cmd, 
                                                 void *struct_ptr, 
                                                 const char *arg);
/**
 * Generic command handling function to respond with cmd-&gt;help as an error
 * @param cmd The command parameters for this directive
 * @param struct_ptr pointer into a given type
 * @param arg The argument to the directive
 * @return The cmd-&gt;help value as the error string
 * @tip This allows simple declarations such as;
 * &lt;pre&gt;
 *     AP_INIT_RAW_ARGS("Foo", ap_set_deprecated, NULL, OR_ALL, 
 *         "The Foo directive is no longer supported, use Bar"),
 * &lt;/pre&gt;
 */
AP_DECLARE_NONSTD(const char *) ap_set_deprecated(cmd_parms *cmd, 
                                                  void *struct_ptr, 
                                                  const char *arg);
/**
 * For modules which need to read config files, open logs, etc. this returns
 * the canonical form of fname made absolute to ap_server_root.
 * @param p pool to allocate data from
 * @param fname The file name
 */
AP_DECLARE(char *) ap_server_root_relative(apr_pool_t *p, const char *fname);

/* Finally, the hook for dynamically loading modules in... */

/**
 * Add a module to the server
 * @param m The module structure of the module to add
 * @param p The pool of the same lifetime as the module
 */
AP_DECLARE(void) ap_add_module(module *m, apr_pool_t *p);

/**
 * Remove a module from the server.  There are some caveats:
 * when the module is removed, its slot is lost so all the current
 * per-dir and per-server configurations are invalid. So we should
 * only ever call this function when you are invalidating almost
 * all our current data. I.e. when doing a restart.
 * @param m the module structure of the module to remove
 */
AP_DECLARE(void) ap_remove_module(module *m);
/**
 * Add a module to the chained modules list and the list of loaded modules
 * @param m The module structure of the module to add
 * @param p The pool with the same lifetime as the module
 */
AP_DECLARE(void) ap_add_loaded_module(module *mod, apr_pool_t *p);
/**
 * Remove a module fromthe chained modules list and the list of loaded modules
 * @param m the module structure of the module to remove
 */
AP_DECLARE(void) ap_remove_loaded_module(module *mod);
/**
 * Add a module to the list of loaded module based on the name of the
 * module
 * @param name The name of the module
 * @param p The pool valid for the lifetime of the module
 * @return 1 on success, 0 on failure
 */
AP_DECLARE(int) ap_add_named_module(const char *name, apr_pool_t *p);
/**
 * Find the name of the specified module
 * @param m The module to get the name for
 * @return the name of the module
 */
AP_DECLARE(const char *) ap_find_module_name(module *m);
/**
 * Find a module based on the name of the module
 * @param name the name of the module
 * @return the module structure if found, NULL otherwise
 */
AP_DECLARE(module *) ap_find_linked_module(const char *name);

/**
 * Open a ap_configfile_t as apr_file_t
 * @param ret_cfg open ap_configfile_t struct pointer
 * @param p The pool to allocate the structure from
 * @param name the name of the file to open
 */
AP_DECLARE(apr_status_t) ap_pcfg_openfile(ap_configfile_t **ret_cfg, 
                                          apr_pool_t *p, const char *name);

/**
 * Allocate a ap_configfile_t handle with user defined functions and params 
 * @param p The pool to allocate from
 * @param descr The name of the file
 * @param param The argument passed to getch/getstr/close
 * @param getc_func The getch function
 * @param gets_func The getstr function
 * @param close_func The close function
 */
AP_DECLARE(ap_configfile_t *) ap_pcfg_open_custom(apr_pool_t *p, 
    const char *descr,
    void *param,
    int(*getc_func)(void*),
    void *(*gets_func) (void *buf, size_t bufsiz, void *param),
    int(*close_func)(void *param));

/**
 * Read one line from open ap_configfile_t, strip LF, increase line number
 * @param buf place to store the line read
 * @param bufsize size of the buffer
 * @param cfp File to read from
 * @return 1 on success, 0 on failure
 */
AP_DECLARE(int) ap_cfg_getline(char *buf, size_t bufsize, ap_configfile_t *cfp);

/**
 * Read one char from open configfile_t, increase line number upon LF 
 * @param cfp The file to read from
 * @return the character read
 */
AP_DECLARE(int) ap_cfg_getc(ap_configfile_t *cfp);

/**
 * Detach from open ap_configfile_t, calling the close handler
 * @param cfp The file to close
 * @return 1 on sucess, 0 on failure
 */
AP_DECLARE(int) ap_cfg_closefile(ap_configfile_t *cfp);

/**
 * Read all data between the current &lt;foo&gt; and the matching &lt;/foo&gt;.  All
 * of this data is forgotten immediately.  
 * @param cmd The cmd_parms to pass to the directives inside the container
 * @param directive The directive name to read until
 * @return Error string on failure, NULL on success
 */
AP_DECLARE(const char *) ap_soak_end_container(cmd_parms *cmd, char *directive);

/**
 * Read all data between the current &lt;foo&gt; and the matching &lt;/foo&gt; and build
 * a config tree from it
 * @param p pool to allocate from
 * @param temp_pool Temporary pool to allocate from
 * @param parms The cmd_parms to pass to all directives read
 * @param current The current node in the tree
 * @param curr_parent The current parent node
 * @param orig_directive The directive to read until hit.
 * @return Error string on failure, NULL on success
*/
AP_DECLARE(const char *) ap_build_cont_config(apr_pool_t *p, 
                                              apr_pool_t *temp_pool,
                                              cmd_parms *parms,
                                              ap_directive_t **current,
                                              ap_directive_t **curr_parent,
                                              char *orig_directive);

/**
 * Build a config tree from a config file
 * @param parms The cmd_parms to pass to all of the directives in the file
 * @param conf_pool The pconf pool
 * @param temp_pool The temporary pool
 * @param conftree Place to store the root node of the config tree
 * @return Error string on erro, NULL otherwise
 */
AP_DECLARE(const char *) ap_build_config(cmd_parms *parms,
                                         apr_pool_t *conf_pool,
                                         apr_pool_t *temp_pool,
                                         ap_directive_t **conftree);

/**
 * Walk a config tree and setup the server's internal structures
 * @param conftree The config tree to walk
 * @param parms The cmd_parms to pass to all functions
 * @param section_vector The per-section config vector.
 * @return Error string on error, NULL otherwise
 */
AP_DECLARE(const char *) ap_walk_config(ap_directive_t *conftree,
                                        cmd_parms *parms,
                                        ap_conf_vector_t *section_vector);

/**
 * @defgroup ap_check_cmd_context ap_check_cmd_context
 * @{
 */
/**
 * Check the context a command is used in.
 * @param cmd The command to check
 * @param forbidden Where the command is forbidden.
 * @return Error string on error, NULL on success
 */
AP_DECLARE(const char *) ap_check_cmd_context(cmd_parms *cmd, 
                                              unsigned forbidden);

#define  NOT_IN_VIRTUALHOST     0x01 /**&lt; Forbidden in &lt;Virtualhost&gt; */
#define  NOT_IN_LIMIT           0x02 /**&lt; Forbidden in &lt;Limit&gt; */
#define  NOT_IN_DIRECTORY       0x04 /**&lt; Forbidden in &lt;Directory&gt; */
#define  NOT_IN_LOCATION        0x08 /**&lt; Forbidden in &lt;Location&gt; */
#define  NOT_IN_FILES           0x10 /**&lt; Forbidden in &lt;Files&gt; */
/** Forbidden in &lt;Directory&gt;/&lt;Location&gt;/&lt;Files&gt;*/
#define  NOT_IN_DIR_LOC_FILE    (NOT_IN_DIRECTORY|NOT_IN_LOCATION|NOT_IN_FILES) 
/** Forbidden in &lt;VirtualHost&gt;/&lt;Limit&gt;/&lt;Directory&gt;/&lt;Location&gt;/&lt;Files&gt; */
#define  GLOBAL_ONLY            (NOT_IN_VIRTUALHOST|NOT_IN_LIMIT|NOT_IN_DIR_LOC_FILE) 

/** @} */

#ifdef CORE_PRIVATE

/**
 * The topmost module in the list
 * @defvar module *ap_top_module
 */
AP_DECLARE_DATA extern module *ap_top_module;

/**
 * Array of all statically linked modules
 * @defvar module *ap_prelinked_modules[]
 */
AP_DECLARE_DATA extern module *ap_prelinked_modules[];
/**
 * Array of all preloaded modules
 * @defvar module *ap_preloaded_modules[]
 */
AP_DECLARE_DATA extern module *ap_preloaded_modules[];
/**
 * Array of all loaded modules
 * @defvar module **ap_loaded_modules
 */
AP_DECLARE_DATA extern module **ap_loaded_modules;

/* For mod_so.c... */
/** Run a single module's two create_config hooks
 *  @param p the pool to allocate from
 *  @param s The server to configure for.
 *  @param m The module to configure
 */
AP_DECLARE(void) ap_single_module_configure(apr_pool_t *p, server_rec *s, 
                                            module *m);

/* For http_main.c... */
/**
 * Add all of the prelinked modules into the loaded module list
 * @param process The process that is currently running the server
 */
AP_DECLARE(void) ap_setup_prelinked_modules(process_rec *process);

/**
 * Show the preloaded configuration directives, the help string explaining
 * the directive arguments, in what module they are handled, and in
 * what parts of the configuration they are allowed.  Used for httpd -h.
 */
AP_DECLARE(void) ap_show_directives(void);

/** 
 * Show the preloaded module names.  Used for httpd -l. 
 */
AP_DECLARE(void) ap_show_modules(void);

/** 
 * Show the MPM name.  Used in reporting modules such as mod_info to
 * provide extra information to the user
 */
AP_DECLARE(const char *) ap_show_mpm(void);

/**
 * Read all config files and setup the server
 * @param process The process running the server
 * @param temp_pool A pool to allocate temporary data from.
 * @param config_name The name of the config file
 * @param conftree Place to store the root of the config tree
 * @return The setup server_rec list.
 */
AP_DECLARE(server_rec *) ap_read_config(process_rec *process, 
                                        apr_pool_t *temp_pool, 
                                        const char *config_name, 
                                        ap_directive_t **conftree);

/**
 * Run all rewrite args hooks for loaded modules
 * @param process The process currently running the server
 */
AP_DECLARE(void) ap_run_rewrite_args(process_rec *process);

/**
 * Run the register hooks function for a specified module
 * @param m The module to run the register hooks function fo
 * @param p The pool valid for the lifetime of the module
 */
AP_DECLARE(void) ap_register_hooks(module *m, apr_pool_t *p);

/**
 * Setup all virtual hosts
 * @param p The pool to allocate from
 * @param main_server The head of the server_rec list
 */
AP_DECLARE(void) ap_fixup_virtual_hosts(apr_pool_t *p, 
                                        server_rec *main_server);

/* For http_request.c... */

/**
 * Setup the config vector for a request_rec
 * @param p The pool to allocate the config vector from
 * @return The config vector
 */
AP_CORE_DECLARE(ap_conf_vector_t*) ap_create_request_config(apr_pool_t *p);

/**
 * Setup the config vector for per dir module configs
 * @param p The pool to allocate the config vector from
 * @return The config vector
 */
AP_CORE_DECLARE(ap_conf_vector_t *) ap_create_per_dir_config(apr_pool_t *p);

/**
 * Run all of the modules merge per dir config functions
 * @param p The pool to pass to the merge functions
 * @param base The base directory config structure
 * @param new_conf The new directory config structure
 */
AP_CORE_DECLARE(ap_conf_vector_t*) ap_merge_per_dir_configs(apr_pool_t *p,
                                           ap_conf_vector_t *base,
                                           ap_conf_vector_t *new_conf);

/* For http_connection.c... */
/**
 * Setup the config vector for a connection_rec
 * @param p The pool to allocate the config vector from
 * @return The config vector
 */
AP_CORE_DECLARE(ap_conf_vector_t*) ap_create_conn_config(apr_pool_t *p);

/* For http_core.c... (&lt;Directory&gt; command and virtual hosts) */

/**
 * parse an htaccess file
 * @param resulting htaccess_result
 * @param r The request currently being served
 * @param override Which overrides are active
 * @param path The path to the htaccess file
 * @param access_name The list of possible names for .htaccess files
 * int The status of the current request
 */
AP_CORE_DECLARE(int) ap_parse_htaccess(ap_conf_vector_t **result, 
                                       request_rec *r, int override,
                                       const char *path, 
                                       const char *access_name);

/**
 * Setup a virtual host
 * @param p The pool to allocate all memory from
 * @param hostname The hostname of the virtual hsot
 * @param main_server The main server for this Apache configuration
 * @param ps Place to store the new server_rec
 * return Error string on error, NULL on success
 */
AP_CORE_DECLARE(const char *) ap_init_virtual_host(apr_pool_t *p, 
                                                   const char *hostname,
                                                   server_rec *main_server, 
                                                   server_rec **);

/**
 * Process the config file for Apache
 * @param s The server rec to use for the command parms
 * @param fname The name of the config file
 * @param conftree The root node of the created config tree
 * @param p Pool for general allocation
 * @param ptem Pool for temporary allocation
 */
AP_DECLARE(void) ap_process_resource_config(server_rec *s, const char *fname, 
                                            ap_directive_t **conftree, 
                                            apr_pool_t *p, apr_pool_t *ptemp);

/**
 * Process all directives in the config tree
 * @param s The server rec to use in the command parms
 * @param conftree The config tree to process
 * @param p The pool for general allocation
 * @param ptemp The pool for temporary allocations
 */
AP_DECLARE(void) ap_process_config_tree(server_rec *s, ap_directive_t *conftree,
                                        apr_pool_t *p, apr_pool_t *ptemp);

/* Module-method dispatchers, also for http_request.c */
/**
 * Run the handler phase of each module until a module accepts the
 * responsibility of serving the request
 * @param r The current request
 * @return The status of the current request
 */
AP_CORE_DECLARE(int) ap_invoke_handler(request_rec *r);

/* for mod_perl */

/**
 * Find a given directive in a command_rec table
 * @param name The directive to search for
 * @param cmds The table to search
 * @return The directive definition of the specified directive
 */
AP_CORE_DECLARE(const command_rec *) ap_find_command(const char *name, 
                                                     const command_rec *cmds);

/**
 * Find a given directive in a list module
 * @param cmd_name The directive to search for
 * @param mod The module list to search
 * @return The directive definition of the specified directive
 */
AP_CORE_DECLARE(const command_rec *) ap_find_command_in_modules(const char *cmd_name, 
                                                                module **mod);

/**
 * Ask a module to create per-server and per-section (dir/loc/file) configs
 * (if it hasn't happened already). The results are stored in the server's
 * config, and the specified per-section config vector.
 * @param server The server to operate upon.
 * @param section_vector The per-section config vector.
 * @param section Which section to create a config for.
 * @param mod The module which is defining the config data.
 * @param pconf A pool for all configuration allocations.
 * @return The (new) per-section config data.
 */
AP_CORE_DECLARE(void *) ap_set_config_vectors(server_rec *server,
                                              ap_conf_vector_t *section_vector,
                                              const char *section,
                                              module *mod, apr_pool_t *pconf);

#endif

  /* Hooks */

/**
 * Run the header parser functions for each module
 * @param r The current request
 * @return OK or DECLINED
 */
AP_DECLARE_HOOK(int,header_parser,(request_rec *r))

/**
 * Run the pre_config function for each module
 * @param pconf The config pool
 * @param plog The logging streams pool
 * @param ptemp The temporary pool
 * @return OK or DECLINED on success anything else is a error
 */
AP_DECLARE_HOOK(int,pre_config,(apr_pool_t *pconf,apr_pool_t *plog,
                                apr_pool_t *ptemp))


/**
 * Run the post_config function for each module
 * @param pconf The config pool
 * @param plog The logging streams pool
 * @param ptemp The temporary pool
 * @param s The list of server_recs
 * @return OK or DECLINED on success anything else is a error
 */
AP_DECLARE_HOOK(int,post_config,(apr_pool_t *pconf,apr_pool_t *plog,
                                 apr_pool_t *ptemp,server_rec *s))

/**
 * Run the open_logs functions for each module
 * @param pconf The config pool
 * @param plog The logging streams pool
 * @param ptemp The temporary pool
 * @param s The list of server_recs
 * @return OK or DECLINED on success anything else is a error
 */
AP_DECLARE_HOOK(int,open_logs,(apr_pool_t *pconf,apr_pool_t *plog,
                               apr_pool_t *ptemp,server_rec *s))

/**
 * Run the child_init functions for each module
 * @param pchild The child pool
 * @param s The list of server_recs in this server 
 */
AP_DECLARE_HOOK(void,child_init,(apr_pool_t *pchild, server_rec *s))

/**
 * Run the handler functions for each module
 * @param r The request_rec
 * @remark non-wildcard handlers should HOOK_MIDDLE, wildcard HOOK_LAST
 */
AP_DECLARE_HOOK(int,handler,(request_rec *r))

/**
 * Run the quick handler functions for each module. The quick_handler
 * is run before any other requests hooks are called (location_walk,
 * directory_walk, access checking, et. al.). This hook was added
 * to provide a quick way to serve content from a URI keyed cache.
 * 
 * @param r The request_rec
 * @param lookup_uri Controls whether the caller actually wants content or not.
 * lookup is set when the quick_handler is called out of 
 * ap_sub_req_lookup_uri()
 */
AP_DECLARE_HOOK(int,quick_handler,(request_rec *r, int lookup_uri))

/**
 * Retrieve the optional functions for each module.
 * This is run immediately before the server starts. Optional functions should
 * be registered during the hook registration phase.
 */
AP_DECLARE_HOOK(void,optional_fn_retrieve,(void))

#ifdef __cplusplus
}
#endif

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"

#endif	/* !APACHE_HTTP_CONFIG_H */[\CODE]

Chris, he has installed plain old Apache, not a package. Hes is trying to get the PHP configured on it. Personally, i’m with chris on this though, I’d suggest you download either WAMP or XAMPP and instll that. They are complete packages with Apache, PHP, MySQL totally configured and ready to go with a fancy little taskbar button to click on and perform admin functions easily.

yeah,…
i am just installing xamp, but i got a question, i got a apache already
where should i install xamp “C:\Apache Group\Apache2\htdocs”
maybe?
or should i deinstall all and install xamp in “C:”??

Yes, delete your current installation. (Although your config file was correct.)

and where should i install xampp??

remove the apache… Then restart the Xampp installation and the default location is what you choose

Off Topic:
I might set up a site for apache help lol

:thumb:
im totally new in this stuff php/mysql/apache
but thank you for your help and patience

no problem i was like this well 2 days ago lol

Chris, that’s not the apache config file. That’s a C program…

With a bunch of config options for the xammp controller. :wink: