Windows + Apache + PHP

Source: Internet
Author: User
Tags apache php

In the past, Apache PHP and Perl support was installed in Linux. Because Linux has installed everything by default, you can simply change the configuration file. It took a lot of time to get Apache PHP support in windows. To sum up, it may be useful in the future.

1. First download the relevant software

  • Apache http://www.apache.org
  • PHP http://www.php.net

2. Configure Apache

Generally, there are two ways to run php. The first method is module mode. Open httpd. conf:

  • Addtype application/X-httpd-PHP. php
  • Loadmodule php4_module "D:/PHP/php4apache2. dll"

The second method is CGI:

  • Addtype application/X-httpd-PHP. php
  • ScriptAlias/PHP/"C:/PHP /"
  • Action application/X-httpd-PHP "/PHP/php.exe"

These are the main points. Add other options such as directoryindex, defaultlanguage, and addcharset as needed.

3. Configure PHP

Copy PHP. ini-recommended to the Windows directory. This is basically OK.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.