nginx php 配置
2014-01-14 16:01
309 查看
nginx php 环境的搭建步骤:
1.nginx 配置:
server {
listen 4446;
server_name localhost;
location / {
root C:/htdocs/first/public/;
index index.php index.htm ;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
root C:/htdocs/first/public/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
}
}
2. php.ini 文件的配置
3.启动 php-cgi.exe
使用php-cgi.exe -b 127.0.0.1:9000
以上就是配置文件的设置。
1.nginx 配置:
server {
listen 4446;
server_name localhost;
location / {
root C:/htdocs/first/public/;
index index.php index.htm ;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
root C:/htdocs/first/public/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
}
}
2. php.ini 文件的配置
;cgi.fix_pathinfo=1去掉;
3.启动 php-cgi.exe
使用php-cgi.exe -b 127.0.0.1:9000
以上就是配置文件的设置。
相关文章推荐
- CentOS+Nginx+PHP+MySQL详细配置(带有图解)
- Linux安装Nginx1.7.4、php5.5.15和配置
- LNMP第二部分nginx、php配置
- Linux安装Nginx1.7.4、php5.5.15和配置
- Fuck PHP (2) Linux+Nginx+PHP配置
- CentOS 7.0 配置nginx+php+mariadb开发环境
- Centos 5.3 Nginx+php+mysql配置 独立的 Subversion (SVN)服务器
- nginx配置:支持phpfastcgi,nginx和php-cgi通信,部分nginx常量解释
- CentOS + Nginx + PHP-FPM(FastCGI) 配置CodeIgniter
- Nginx虚拟目录配置文件(包含PHP配置与重写)
- nginx配置php
- Linux下Nginx+PHP+MySQL配置(图)
- nginx 配置 支持 index.php/login方法
- nginx 0.6.3 安装与配置(linux,nginx,php-cgi)
- Ubuntu安装PHP和PHP Nginx配置方法
- phalconphp nginx 配置
- Ubuntu 配置 NginX + PHP + FastCGI + MySQL 原来如此简单
- 实战Nginx与PHP(FastCGI)的安装、配置与优化
- [转]nginx php-fpm安装配置
- Nginx隐藏index.php和Pathinfo模式配置例子