Configuration? -Php Tutorial

Source: Internet
Author: User
How can I build Windows 7 + nginx + php? Operating system: window7 ??? Php5.4.17 ???? Nginx1.5.2 ?? Download and Download php. Address: www. php. netdownloads. php first creates a folder named "wnmp" on the E drive, and then decompress PHP to the modified file. Download nginx at: nginx. orgendow win7 + nginx + php

?

Operating system: window7 ??? Php5.4.17 ???? Nginx1.5.2

?

? Download
  • Download php, address: http://www.php.net/downloads.php


  • Create a folder named "wnmp" on the E drive and decompress PHP to the file.

  • Download nginx, address: http://nginx.org/en/download.html



?

?

  • Create the "nginx" folder in the wnmp folder and decompress nginx to the change folder.
Configuration?
  • Go to the php folder and change "php. ini-development" to php. ini.
  • Open the php. ini file and modify the content.
  • extension_dir = "ext"date.timezone = Asia/ChongQing
    ?

Nginx requires cgi php, so you need to change the following content:

enable_dl = Oncgi.force_redirect = 0cgi.fix_pathinfo=1fastcgi.impersonate = 1cgi.rfc2616_headers = 1

? The PHP configuration has come to an end, and nginx is configured.

?

  • Start nginx first, use DOS to enter the nginx path, and run the following command to start nginx
  • Nginx-s reload // restart Nginxnginx-s stop // pause nginx-s quit // exit nginxstart nginx // start
    ? Enter 127.0.0.1 in the address bar of the browser to display the interface, which indicates that nginx is started normally.

  • Nginx accesses the index. php file under E: \ wnmp \ nginx \ html \ index.html by default.
  • Modify the nginx. conf (E: \ wnmp \ nginx \ conf \ nginx. conf) file to configure the website.
  • Events {worker_connections 1024;} http {include mime. types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server {listen 80; server_name localhost; # Local IP root E:/wnmp/www; # store the website's root directory location/{index. php index.html index.htm; # Add index. php. # Autoindex on; # list the directory structure if the file does not exist;} location ~ \. Php $ {fastcgi_pass 127.0.0.1: 9000; # fastcgi and the listening port must be consistent with the fastcgi_index index when php cgi is started. php; fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name; include fastcgi_params ;}}}
    ?
    ? So the configuration is complete.

?

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.