nginx配置php
2016-11-30 22:17
218 查看
进入nginx.conf配置文件,加入如下代码
重启nginx命令:
重启php命令
location ~ \.php$ { #碰到php文件时候 fastcgi_pass 127.0.0.1:9000; #转发到9000端口 fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location / { root html; #源代码目录 index index.php index.html index.htm; }
重启nginx命令:
nginx -s reload #优雅重启
重启php命令
pkill -9 php-fpm ./php-fpm -R
相关文章推荐
- nginx+PHP+PHP-FPM(FastCGI)在Ubuntu上的安装和配置
- Nginx 0.7.x + PHP 5.2.10(FastCGI)搭建胜过Apache十倍的Web服务器 安装与配置(1)
- Centos 5.3 Nginx+php+mysql配置 独立的 Subversion (SVN)服务器
- nginx 下php配置文件需要生效改如何重启?
- RHEL5下nginx+php+mysql+tomcat+memchached配置全过程
- 在Ubuntu 8.04 LTS(hardy)下安装配置nginx和fastcgi方式的php
- FreeBSD下nginx并支持php配置详解
- Redhat+Nginx+PHP+Mysql安装配置
- nginx 0.6.3 安装与配置(linux,nginx,php-cgi)
- nginx+PHP+PHP-FPM(FastCGI)在Ubuntu上的安装和配置
- FreeBSD+nginx+php+fcgi配置步骤
- 自动配置php、mysql、nginx的脚本
- nginx+PHP+PHP-FPM(FastCGI)在Ubuntu上的安装和配置
- Nginx安装配置(含PHP支持、虚拟主机、反向代理负载均衡)
- Nginx 0.7.x + PHP 5.2.10(FastCGI)搭建胜过Apache十倍的Web服务器 安装与配置(4)
- CentOS5下安装配置nginx+fastcgi php+mysql
- Ubuntu 配置 NginX + PHP + FastCGI + MySQL 原来如此简单
- Windows下配置Nginx+php+mysql
- linux+nginx+mysql+php的简单配置
- Ubuntu + Nginx/PHP/MYSQL开发环境配置图文教程