Home Backend Development PHP Tutorial LNMP configures NGINX to support THINKPHP PATHINFO mode

LNMP configures NGINX to support THINKPHP PATHINFO mode

Jul 28, 2016 am 08:30 AM
lnmp nginx pathinfo thinkphp

In Alipay callback and WeChat callback methods. Parameters in the middle are not supported normally? s=, so the PATHINFO mode of THINKPHP must be turned on.

THINKPHP official forum and many NGINX configuration tutorials on the Internet are not very complete.

I always prefer to use lnmp.org to configure the server environment.

So this article will introduce LNMP to configure NGINX to support THINKPHP PATHINFO mode.

The method is very simple.

1, modify PHP.INI to support PHPINOF

PHP configuration file: /usr/local/php/etc/php.ini

Change php.ini
Found: cgi.fix_pathinfo=0
Change to: cgi.fix_pathinfo=1

 LNMP 配置NGINX 支持THINKPHP PATHINFO模式

2. Modify the nginx corresponding configuration file

/usr/local/nginx/conf/vhost/your domain name configuration file

Remove the # in include pathinfo and add it before try_files #;

 LNMP 配置NGINX 支持THINKPHP PATHINFO模式
3. Restart lnmp.

lnmp restart

Reprinted, original address: http://my.oschina.net/caomenglong/blog/660529

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces how LNMP configures NGINX to support THINKPHP PATHINFO mode, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to allow external network access to tomcat server How to allow external network access to tomcat server Apr 21, 2024 am 07:22 AM

How to allow external network access to tomcat server

How to run thinkphp project How to run thinkphp project Apr 09, 2024 pm 05:33 PM

How to run thinkphp project

There are several versions of thinkphp There are several versions of thinkphp Apr 09, 2024 pm 06:09 PM

There are several versions of thinkphp

What are the nginx start and stop commands? What are the nginx start and stop commands? Apr 02, 2024 pm 08:45 PM

What are the nginx start and stop commands?

How to run thinkphp How to run thinkphp Apr 09, 2024 pm 05:39 PM

How to run thinkphp

How to install thinkphp How to install thinkphp Apr 09, 2024 pm 05:42 PM

How to install thinkphp

Welcome to nginx!How to solve it? Welcome to nginx!How to solve it? Apr 17, 2024 am 05:12 AM

Welcome to nginx!How to solve it?

How to register phpmyadmin How to register phpmyadmin Apr 07, 2024 pm 02:45 PM

How to register phpmyadmin

See all articles