nginx 之cgi fastcgi.conf和fastcgi_params的区别
2015-11-23 11:00
661 查看
nginx 之cgi
fastcgi.conf和fastcgi_params的区别:
只有一行的差别$: diff fastcgi_params fastcgi.conf
2d1
< fastcgi_param SCRIPT_FILENAME fastcgi_script_name;
不再建议大家使用以下方式(搜了一下,网上大量的文章,并且nginx.conf的默认配置也是使用这种方式):
location ~ \.php$ { root /var/www/wordpress; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; #include fastcgi_params; include fastcgi.conf;#只用包含fastcgi.conf就行了,上面就可以省去了 }
server { listen 80; server_name localhost; location / { root /var/www/html; index index.html index.htm index.php; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /var/www/html; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; } location ~ \.cgi$ { fastcgi_pass 127.0.0.1:8080; fastcgi_index index.cgi; fastcgi_param SCRIPT_FILENAME fcgi$fastcgi_script_name; include fastcgi_params; } }
相关文章推荐
- nginx php mysql 安装
- Nginx、LVS及HAProxy负载均衡软件的优缺点详解
- nginx
- nginx.conf配置
- windows下配置nginx非80端口转发
- 【nginx】关于gzip压缩
- Nginx配置详解
- nginx+ffmpeg搭建流媒体服务器
- LOCATION BLOCK 匹配规则
- awstats和jawstats对apache、nginx进行多站点日志分析
- 【nginx】配置文件的优化
- nginx内核socket优化
- Nginx的安装实现web功能
- nginx 练习配置
- Nginx负载均衡
- linux--nginx
- nginx proxy_pass 后面的url 加与不加/的区别
- 【nginx】关于fastcgi_cache
- 初步nginx 运行magento2 conf
- nginx 支持apk ipa文件下载的设置方法