# Apache/ php-configuration

**URL:** <https://forum.kirupa.com/t/apache-php-configuration/186656>\
**Category:** Uncategorized\
**Created:** [April 23, 2006, 10:16am UTC](https://forum.kirupa.com/t/apache-php-configuration/186656 "2006-04-23T10:16:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Exos\_Sho](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@Exos\_Sho](https://forum.kirupa.com/u/Exos_Sho)\
**Post date:** [April 23, 2006, 10:16am UTC](https://forum.kirupa.com/t/apache-php-configuration/186656/1 "2006-04-23T10:16:00Z")

</div>

ok, ive insatlled apache2,0,52 on windows  
the “[FONT=Book Antiqua][http://localhost/index.html.de[/FONT]](http://localhost/index.html.de%5B/FONT%5D)” 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]](http://localhost/phpinfo.php%5B/FONT%5D)” it just keeps loading and dont stops, and the site doesnt appear

i hope someone can help me,  
thx

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

---

<div class="post-metadata">

**Author:** ![chrisclick](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chrisclick/32/1991_2.png) [@chrisclick](https://forum.kirupa.com/u/chrisclick)\
**Post date:** [April 23, 2006, 10:22am UTC](https://forum.kirupa.com/t/apache-php-configuration/186656/2 "2006-04-23T10:22:39Z")

</div>

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

[http://h.selfip.com/pic.jpg](http://h.selfip.com/pic.jpg)

(on my server)

---

<div class="post-metadata">

**Author:** ![chrisclick](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chrisclick/32/1991_2.png) [@chrisclick](https://forum.kirupa.com/u/chrisclick)\
**Post date:** [April 23, 2006, 10:40am UTC](https://forum.kirupa.com/t/apache-php-configuration/186656/3 "2006-04-23T10:40:28Z")

</div>

Ok were did you place the

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

---

<div class="post-metadata">

**Author:** ![Exos\_Sho](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@Exos\_Sho](https://forum.kirupa.com/u/Exos_Sho)\
**Post date:** [April 23, 2006, 11:02am UTC](https://forum.kirupa.com/t/apache-php-configuration/186656/4 "2006-04-23T11:02:00Z")

</div>

> [@chris.jones071@](#):
>
> Ok were did you place the
> 
> ```auto
> 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]

---

<div class="post-metadata">

**Author:** ![chrisclick](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chrisclick/32/1991_2.png) [@chrisclick](https://forum.kirupa.com/u/chrisclick)\
**Post date:** [April 23, 2006, 11:22am UTC](https://forum.kirupa.com/t/apache-php-configuration/186656/5 "2006-04-23T11:22:03Z")

</div>

after the

```auto
#endif /* !APACHE_HTTP_CONFIG_H */ 

```

?

---

<div class="post-metadata">

**Author:** ![Exos\_Sho](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@Exos\_Sho](https://forum.kirupa.com/u/Exos_Sho)\
**Post date:** [April 23, 2006, 2:36pm UTC](https://forum.kirupa.com/t/apache-php-configuration/186656/6 "2006-04-23T14:36:17Z")

</div>

> [@chris.jones071@](#):
>
> after the
> 
> ```auto
> #endif /* !APACHE_HTTP_CONFIG_H */ 
> 
> ```
> 
> ?

there is no #endif in my conf

---

<div class="post-metadata">

**Author:** ![chrisclick](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chrisclick/32/1991_2.png) [@chrisclick](https://forum.kirupa.com/u/chrisclick)\
**Post date:** [April 23, 2006, 2:37pm UTC](https://forum.kirupa.com/t/apache-php-configuration/186656/7 "2006-04-23T14:37:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Exos\_Sho](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@Exos\_Sho](https://forum.kirupa.com/u/Exos_Sho)\
**Post date:** [April 23, 2006, 2:56pm UTC](https://forum.kirupa.com/t/apache-php-configuration/186656/8 "2006-04-23T14:56:14Z")

</div>

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](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](http://httpd.apache.org/docs-2.0/mod/mpm_common.html#lockfile&gt;));

# 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](mailto:admin@your-domain.com)

# 

ServerAdmin [ex@exossho.com](mailto: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](http://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](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](http://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](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](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](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](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](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](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](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](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](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](mailto:webmaster@dummy-host.example.com)

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

# ServerName [dummy-host.example.com](http://dummy-host.example.com)

# ErrorLog logs/dummy-host.example.com-error\_log

# CustomLog logs/dummy-host.example.com-access\_log common

#\</VirtualHost\>#

---

<div class="post-metadata">

**Author:** ![chrisclick](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chrisclick/32/1991_2.png) [@chrisclick](https://forum.kirupa.com/u/chrisclick)\
**Post date:** [April 23, 2006, 3:06pm UTC](https://forum.kirupa.com/t/apache-php-configuration/186656/9 "2006-04-23T15:06:48Z")

</div>

Ok please supply the link you recived the apache file from

---

<div class="post-metadata">

**Author:** ![Exos\_Sho](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@Exos\_Sho](https://forum.kirupa.com/u/Exos_Sho)\
**Post date:** [April 23, 2006, 3:12pm UTC](https://forum.kirupa.com/t/apache-php-configuration/186656/10 "2006-04-23T15:12:44Z")

</div>

i got apache from a cd

---

<div class="post-metadata">

**Author:** ![chrisclick](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chrisclick/32/1991_2.png) [@chrisclick](https://forum.kirupa.com/u/chrisclick)\
**Post date:** [April 23, 2006, 3:15pm UTC](https://forum.kirupa.com/t/apache-php-configuration/186656/11 "2006-04-23T15:15:39Z")

</div>

is it XAMPP

My config:

```auto
/* 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]
```

---

<div class="post-metadata">

**Author:** ![JoshuaJonah](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshuajonah/32/1775_2.png) [@JoshuaJonah](https://forum.kirupa.com/u/JoshuaJonah)\
**Post date:** [April 23, 2006, 3:20pm UTC](https://forum.kirupa.com/t/apache-php-configuration/186656/12 "2006-04-23T15:20:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Exos\_Sho](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@Exos\_Sho](https://forum.kirupa.com/u/Exos_Sho)\
**Post date:** [April 23, 2006, 3:38pm UTC](https://forum.kirupa.com/t/apache-php-configuration/186656/13 "2006-04-23T15:38:23Z")

</div>

> [@Defective](#):
>
> 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:”??

---

<div class="post-metadata">

**Author:** ![Jeff\_Wheeler](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@Jeff\_Wheeler](https://forum.kirupa.com/u/Jeff_Wheeler)\
**Post date:** [April 23, 2006, 3:41pm UTC](https://forum.kirupa.com/t/apache-php-configuration/186656/14 "2006-04-23T15:41:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Exos\_Sho](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@Exos\_Sho](https://forum.kirupa.com/u/Exos_Sho)\
**Post date:** [April 23, 2006, 3:45pm UTC](https://forum.kirupa.com/t/apache-php-configuration/186656/15 "2006-04-23T15:45:36Z")

</div>

and where should i install xampp??

---

<div class="post-metadata">

**Author:** ![chrisclick](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chrisclick/32/1991_2.png) [@chrisclick](https://forum.kirupa.com/u/chrisclick)\
**Post date:** [April 23, 2006, 3:46pm UTC](https://forum.kirupa.com/t/apache-php-configuration/186656/16 "2006-04-23T15:46:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Exos\_Sho](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@Exos\_Sho](https://forum.kirupa.com/u/Exos_Sho)\
**Post date:** [April 23, 2006, 4:16pm UTC](https://forum.kirupa.com/t/apache-php-configuration/186656/17 "2006-04-23T16:16:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chrisclick](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chrisclick/32/1991_2.png) [@chrisclick](https://forum.kirupa.com/u/chrisclick)\
**Post date:** [April 23, 2006, 4:25pm UTC](https://forum.kirupa.com/t/apache-php-configuration/186656/18 "2006-04-23T16:25:52Z")

</div>

no problem i was like this well 2 days ago lol

---

<div class="post-metadata">

**Author:** ![955](https://avatars.discourse-cdn.com/v4/letter/9/4bbf92/32.png) [@955](https://forum.kirupa.com/u/955)\
**Post date:** [April 23, 2006, 6:23pm UTC](https://forum.kirupa.com/t/apache-php-configuration/186656/19 "2006-04-23T18:23:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jeff\_Wheeler](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@Jeff\_Wheeler](https://forum.kirupa.com/u/Jeff_Wheeler)\
**Post date:** [April 23, 2006, 6:37pm UTC](https://forum.kirupa.com/t/apache-php-configuration/186656/20 "2006-04-23T18:37:27Z")

</div>

With a bunch of config options for the xammp controller. 😉

[Next page](https://forum.kirupa.com/t/apache-php-configuration/186656.md?page=2)
