ubuntu16.04安装nginx和php-fpm后进程正常启动下php文件无法访问
2018-03-19 11:18
615 查看
首先 在安装完后要将nginx的配置文件修改将如下代码的注释去掉
location ~ \.php$ { root /usr/local/nginx/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
然后将php配置文件php.ini,将cgi.fix_pathinfo=0 改成cgi.fix_pathinfo=1。
然后修改php-fpm的配置文件在php-fpm的配置文件最后加上
listen =127.0.0.1:9000
然后重启php-fpm,nginx即可
location ~ \.php$ { root /usr/local/nginx/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
然后将php配置文件php.ini,将cgi.fix_pathinfo=0 改成cgi.fix_pathinfo=1。
然后修改php-fpm的配置文件在php-fpm的配置文件最后加上
listen =127.0.0.1:9000
然后重启php-fpm,nginx即可
相关文章推荐
- Ubuntu 16.04 LTS 安装配置 Nginx 1.10.0 Php7.0-FPM
- DISCUZ论坛配置文件 "config_global.php" 未找到或者无法访问, 请确认您已经正确安装了程序
- “因以下文件损坏〈window root>/system32/hal.dll 损坏无法正常启动请安装以上的拷贝文件”解决
- nginx+PHP+PHP-FPM(FastCGI)在Ubuntu上的安装和配置
- iis无法启动 “另一个程序正在使用此文件,进程无法访问”
- 启动IIS 网站出现错误 另一个程序正在使用此文件,进程无法访问
- ubuntu编译安装PHP5.4.0+Nginx(FPM/FastCGI)
- Ubuntu下安装Nginx,PHP5(及PHP-FPM),MySQL
- ubuntu编译安装PHP5.4.0+Nginx(FPM/FastCGI)
- centos yum配置mysql-5.5/5.1 php 5.3 nginx安装 spawn-fcgi 安装 php-fpm启动
- ubuntu 12.10 默认安装php5-fpm无监听9000端口,nginx无法链接php5-fpm修正
- nginx+PHP+PHP-FPM(FastCGI)在Ubuntu上的安装和配置
- 本地环境 Ubuntu 下安装XAMPP,phpmyadmin无法正常访问解决办法
- windows2003 IIS 服务启动失败,提示‘另一个程序正在使用此文件,进程无法访问',解决方法!
- IIS不能启动,提示"另一程序正在使用此文件,进程无法访问"
- iis中web站点无法启动:另一程序正在使用该文件,进程无法访问--解决
- windows2003 IIS 服务启动失败,提示‘另一个程序正在使用此文件,进程无法访问',解决方法
- nginx+PHP+PHP-FPM(FastCGI)在Ubuntu上的安装和配置
- error 25015安装程序集“C:\Windows\Microsoft .NET\Framework\v2.0.50727\xxx.dll”失败,原因是出现了系统错误:另一个程序正在使用此文件,进程无法访问
- Ubuntu 11.10安装vmware7.1.4 build-385536 后,无法正常启动的解决办法