Configuring NGINX+MYSQL+PHP7 under Windows

Source: Internet
Author: User

Environment: WINDOWS10

Mysql-5.6.24-win32 Decompression Version

nginx-1.8.0

Php7

1. mysql Installation

Unzip to the appropriate directory after downloading the compressed file (my directory is G:\wnmp\mysql-5.6.24-win32)

The MySQL root directory modifies the My-default.ini file to My.ini file: Modify the # number before the Basedir and datadir two paths to

Basedir = G:\wnmp\mysql-5.6.24-win32
DataDir = G:\wnmp\mysql-5.6.24-win32\data (the directory is replaced with the appropriate decompression path)

Run cmd as an administrator,

G:

CD \wnmp\mysql-5.6.24-win32

Mysqld-install

net start MySQL

Service started successfully, if error 1067 indicates a problem with the configuration file

2. PHP Installation

PHP7 download down and unzip into the PHP7 directory to execute php-cgi-b 9000-q (port corresponding to the following nginx configuration)

3, Nginx Installation

Modify Nginx configuration file nginx.conf

Location ~ \.php$ {
root HTML;
Fastcgi_pass 127.0.0.1:9000;
Fastcgi_index index.php;
Fastcgi_param script_filename $document _root$fastcgi_script_name;
Include Fastcgi_params;
}

You can start the Nginx

Here the initial environment is configured to complete, you can create a new PHP file in the browser to test whether the installation is successful!

About the configuration File (php.ini) path problem under Phpinfo:

I print here is C:\Windows, so deliberately checked the following related issues, get the following results:

The PHP runtime in the Windows environment first looked for the configuration file in the C:\WINDOWS, could not find it in the PHP installation directory to find, two directories can not find to use PHP default configuration environment. So you just have to have at least one PHP configuration file in the C:\WINDOWS or PHP installation directory.

Configuring NGINX+MYSQL+PHP7 under Windows

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.