admin Site Admin
Joined: 23 Jan 2003 Posts: 256 Location: India
|
Posted: Thu Jan 30, 2003 3:21 pm Post subject: Installing Apache and PHP on Windows |
|
|
Installing Apache and PHP on Windows
You can get Apache web server windows binary from
http://httpd.apache.org/
Download Windows Binary and install.
You can get PHP from
http://www.php.net
Download the Win 32 Binary or MSI package and install it. During installation it ask for the web server, select Apache.
PHP Auto Configures for many web servers, for Apache, you need to configure manually. For Apache to run PHP files, you need to edit httpd.conf file.
Open HTTPD.CONF in any Text Editor like Notepad or Edit Plus (www.editplus.com)
Add following lines into your HTTPD.CONF file
| Code: |
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"
|
Now Apache will run files with .php extension as php script.
Setting DirectoryIndex
In HTTPD.CONF You can see
| Code: | | DirectoryIndex index.html index.html.var |
change it to
| Code: | | DirectoryIndex index.html hostonnet.html index.html.var |
This will enable web server to take hostonnet.html as the INDEX page in a Folder.
AddHandler
AddHandler helps you to assign your own extension to PHP Scripts. To do this add following line to httpd.conf file.
| Code: | | AddHandler application/x-httpd-php .php3 .phtml |
Here .php3 and .phtml files are treated as PHP Script.
[/code] |
|