- 论坛徽章:
- 0
|
本帖最后由 eremiter 于 2017-02-13 15:52 编辑
php5.5.54已经集成了php-fpm,但在centos却找不到php-fpm.conf
所以只能在命令行运行php,在nginx1.10.3提示找不到网页
whereis php-fpm 命令显示如下
在编译php5.5.38中使用
./configure
或
- ./configure
- --prefix=/usr/local/php
- --enable-xml --enable-bcmath
- --enable-shmop
- --enable-sysvsem
- --enable-inline-optimization
- --enable-opcache
- --enable-mbregex
- --enable-fpm
- --enable-mbstring
- --enable-ftp
- --enable-gd-native-ttf
- --with-openssl
- --enable-pcntl
- --enable-sockets
- --with-xmlrpc
- --enable-zip
- --enable-soap
- --without-pear
- --with-gettext
- --enable-session
- --with-mcrypt
- --with-curl
- --enable-ctype
- --enable-shared
- --disable-fileinfo
- --enable-fasecgi
复制代码
不知哪里没配置好,导致nginx无法认到php-fpmnginx中的default.conf配置如下
- server {
- listen 80;
- server_name localhost;
- #root /home/wwwroot/erpbs;
- index index.html index.php default.html default.php;
- #charset koi8-r;
- #access_log /var/log/nginx/log/host.access.log main;
- location / {
-
- }
- #error_page 404 /404.html;
- # redirect server error pages to the static page /50x.html
- #
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- #root /home/wwwroot/erpbs;
- }
- # proxy the PHP scripts to Apache listening on 127.0.0.1:80
- #
- #location ~ \.php$ {
- # proxy_pass http://127.0.0.1;
- #}
- # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
- #
- location ~ \.php$ {
- root /home/wwwroot/erpbs;
- # try_files $uri =404;
- 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;
- #}
- }
复制代码
|
|