nginx-php-fpm

思动博客

https://www.cnblogs.com/jecyhw/p/5504855.html
http://blog.csdn.net/god_for/article/details/50500342

mkdir /data/php7

./configure --prefix=/data/php7 \
--with-curl \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv-dir \
--with-kerberos \
--with-libdir=lib64 \
--with-libxml-dir \
--with-mysqli \
--with-openssl \
--with-pcre-regex \
--with-pdo-mysql \
--with-pdo-sqlite \
--with-pear \
--with-png-dir \
--with-xmlrpc \
--with-xsl \
--with-zlib \
--enable-fpm \
--enable-bcmath \
--enable-libxml \
--enable-inline-optimization \
--enable-gd-native-ttf \
--enable-mbregex \
--enable-mbstring \
--enable-opcache \
--enable-pcntl \
--enable-shmop \
--enable-soap \
--enable-sockets \
--enable-sysvsem \
--enable-xml \
--enable-zip \
--disable-fileinfo

 

yum -y install libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel mysql pcre-devel

# yum -y install curl-devel
# yum -y install libxslt-devel

make

make install

server {
listen 80;
server_name test.php.com;
access_log /data/testnginx/logs/test.php.com.access.log;
error_log /data/testnginx/logs/test.php.com.error.log info;

root /data/php7/www;
index index.html index.htm;
location ~ \.php$ {
root /data/php7/www; #指定php的根目录
fastcgi_pass 127.0.0.1:6000;#php-fpm的默认端口是9000
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}

 

posted @ 2017-11-22 22:31  紫long  阅读(226)  评论(0编辑  收藏  举报