2015-03-04

Put the Apache 2

Download http://httpd.apache.org/download.cgi. Load the file apache_2.0.55-win32-x86-no_ssl.exe in the distributions and launch it. Click Next, as shown in Figure

Accept the license and click “next”

You can read about this version if you want. Click “Next”

If you do not have a registered domain (like me), you can write what you want. Set the options as seen in the figure, press “next”

Put “normal” installation type, click “next”

Here you can select a folder in which to place the module in Apache. I chose the default. It should be noted that the data of the server itself (its content) can be in any folder on any drive, this is indicated in the settings of Apache (it will be raskazano below). Click “Next”

Finally we start the installation, click “Install”

Once finished the installation of Apache, click Finish and exit the Setup program

Everything now Apache is installed, configure the left. Configuration information I picked up from here.

First, create a folder in the root of a disk (I did D:\Site\), in which all other applications and site data. Next, create the papkuD: \ Site\localhost\, where cgi www and create directories, respectively. www will contain the contents of the site, a cgi-CGI scripts, if you will. From the ..\Apache2\logs\ folder, copy the file access.log error.log D:\Site\localhost\ directory and purely for convenience. On the name of the data files is easy to understand their function: the registration of the addresses of the site or errors, respectively. In the ..\Apache2\conf\ directory. find the httpd.conf file (not to be confused with httpd.default.conf) is the configuration file of Apache. In it, find the line

ServerRoot “C:/Program Files/Apache Group/Apache2″

1

ServerRoot “C:/Program Files/Apache Group/Apache2″

It should contain the path to the Apaču, that is, the folder where you installed Apache. Note that the path forward slash and ending address without the slash.

Next, bind to a particular port of Apache:

Listen 80

1

Listen 80

When some server error Apache gives out the E-mail administrator, you can add this line

Serveradmin your@email.name

1

Serveradmin your@email.name

Now set the path to the data site

DocumentRoot “D:/Site/localhost/www”

1

DocumentRoot “D:/Site/localhost/www”

Locate block

1

and replace it with a
Options Indexes Includes AllowOverride All Order allow, deny Allow from all

1

2

3

4

5

6

Options Indexes Includes

Allowoverride All

Order allow, deny

Allow from all

Set the files to be opened by default, if the browser address bar will not be displayed on the page to open the first

DirectoryIndex index.html index.html.var index.php

1

DirectoryIndex index.html index.html.var index.php

Setting up the languages. In the language settings, leave only the line

AddLanguage en .en AddLanguage ru .ru

1

2

AddLanguage en .en

AddLanguage ru .ru

Next, set the language priority

LanguagePriority en ru

1

LanguagePriority en ru

Setting character encoding:

AddDefaultCharset WINDOWS-1251 AddCharset WINDOWS-1251. cp-1251 win-1251.

1

2

AddDefaultCharset WINDOWS-1251

Addcharset WINDOWS-1251. cp-1251 win-1251.

the rest simply zarem′te the # symbol.

Include SSI

AddType text/html .shtml AddHandler server-parsed .shtml .html .htm

1

2

AddType text/html .shtml

AddHandler server-parsed .shtml .html .htm

Since we have no virtual hosts, then set the log file path:

Errorlog D:/Site/localhost/error.log CustomLog D:/Site/localhost/access.log common

1

2

Errorlog D:/Site/localhost/error.log

CustomLog D:/Site/localhost/access.log common

All Apache installed. Restart it for the changes to take effect.

To verify that the file index.html in the directory D:\Site\localhost\www write the following:

Hello World

Hello World

If Apache is installed correctly, typing in the address bar of your browser the address http://localhost/will open this index.html with the words Hello World. If is not displayed, then dig in the settings of Apache, recheck everything you can: slashes, directories, proprietary tags, etc.

Put PHP 5

First download php-5.1.2-Win32.zip file from http://www.php.net/downloads.php. Unpack it

The post Installing Apache + PHP + MySQL on Windows appeared first on VULTR Coupons.

Show more