host 配置
server {
listen 80;
server_name test.com;
root /var/www/test;
index index.html index.php;
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000; #指定了fastcgi进程侦听的端口,nginx就是通过这里与php交互的
include fastcgi.conf;
}
}
php安装
PHP 7.0版本
$ yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64
yum install php70w-fpm
还有其他版本把70换71,即可。
https://blog.csdn.net/sinat_32829963/article/details/81558483
网友评论