nginx1.6 resolve problems with php

Today to build nginx1.6 + php7.3 + index.php appear when the problem can not be resolved mysql5.7 but normal html parsing, and finally to modify the configuration file the default configuration solutions to solve now written down for future use:
the environment is yum install is not described here, download their latest repo file can be installed, in addition to repo files can make a bag for future use. Change the configuration locations are as follows:

        location ~ .*\.(php)?$ {
        #root           html;
        root           /var/www/html;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        # fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        fastcgi_param  SCRIPT_FILENAME  /var/www/html/$fastcgi_script_name;

The full path to your root can be added before $ after the restart nginx returned to normal resolution.

Guess you like

Origin blog.51cto.com/9447803/2415235