Install Apache + PHP and windowapache in Windows

Source: Internet
Author: User

Install Apache + PHP and windowapache in Windows

The local system for windows 10, Apache select httpd-2.4.25-x64-vc14-r1, PHP select php7.1 _ x64 thread security edition.

1. install Apache

 

2. install PHP
  • Modify the apache configuration file httpd. conf and load the PHP module in the appropriate location

    //php5.6LoadModule php5_module C:/server/php56/php5apache2_4.dllPHPIniDir "C:/server/php56"//php7.1LoadModule php7_module C:/server/php71/php7apache2_4.dllPHPIniDir "C:/server/php71"
     
  • Modify httpd. conf and add the code at the appropriate location.

    AddType application/x-httpd-php .phpAddType application/x-httpd-php .htmlAddType application/x-httpd-php .htmAddType application/x-httpd-php .shtml
  • Modify httpd. conf-> DirectoryIndex index.html index.shtml index.htm index. php

  • Copy and rename php. ini, modify the time zone PRC, and enable some common extensions.

  • Add the php installation directory and the php/ext directory to the path environment variable. Otherwise, the PHP Command Line tool cannot be used and the curl module fails to be loaded.

  • Restart apache
    httpd -k restart

 

3. Configure Apache3.1 to add a VM
  • Modify the http. conf file and add the code in the last line:
Include conf/vhosts/*.conf
  • Vhosts/web. conf In the conf folder
    listen 80<VirtualHost *:80>    DocumentRoot "d:/web/www"    <Directory "d:/web/www">        Options Indexes FollowSymLinks        AllowOverride all        Require all granted    </Directory></VirtualHost>

 

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.