Win7 configuration Nginx + PHP

Source: Internet
Author: User

Create the file Php-cgi.cmd under Nginx and write the contents:

"D:\nginx_php-5.6.3-Win32-VC11-x64\php-cgi.exe"-B 127.0.0.1:9000-c "D:\nginx_php-5.6.3-Win32-VC11-x64\php.ini"

Q: What should I do if I lose my Computer msvcr110.dll?

A: Baidu experience to find the answer: http://jingyan.baidu.com/article/4f7d57129fa86e1a201927de.html

That is: http://www.microsoft.com/zh-CN/download/details.aspx?id=30679 download the Vsu4\vcredist_x64.exe and install (note 32-bit and 64-bit) can be resolved.

Q: What to do if the browser page appears no input file specified when running PHP file

Answer: In nginx.conf, line Fastcgi_param script_name/scripts$fastcgi_script_name;

Change the/scripts to $document_root can be solved.

Configuration instructions for several lines of core code in NGINX.CONF:

To configure the Project Access path:

Location/{
# root HTML;
Root e:/workspace/solomo/www/test/php_core/; #站点根目录
Index index.html index.htm index.php; #指定默认首页
AutoIndex on; # If the index item is not configured, displays a list of files under the root directory
}

To configure access to PHP files:

        Location ~ \.php$ {
             root           e:/workspace/solomo/ www/test/php_core/;  #站点根目录
            fastcgi_ pass   127.0.0.1:9000;
            fastcgi_index  index.php;
           # fastcgi_param  script_name /scripts$ Fastcgi_script_name;
            fastcgi_param  script_filename  $document _root$fastcgi_script_name; When #当输出No input file specified, change/scripts to $document_root
              include        Fastcgi_params;
       }

Win7 configuration Nginx + PHP

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.