C2/C3 Wiki

C2/C3开发者的乐园

用户工具

站点工具


ubuntu_nginx_php-fpm_mysql_redis

这是本文档旧的修订版!


ubuntu+Nginx+php-fpm+Mysql+Redis

安装LNMP环境

apt-get install nginx mysql-server php

vi /etc/nginx/sites-available/default
......
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
    incloude snippets/fastcgi-php.conf;
#
#    # With php7.0-cgi alone;
#    fastcgi_pass 127.0.0.1:9000;
#    # With php7.0-fpm;
    fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
......

nginx -s stop
nginx

vi /var/www/html/info.php
<?php phpinfo();?>
ubuntu_nginx_php-fpm_mysql_redis.1521935431.txt.gz · 最后更改: (外部编辑)