访问lnmp安装目录,然后访问并运行install.sh上的目录:
sudo ./install.sh mphp
成功选择要安装的版本后,请选择要在配置文件中加载的版本
{
listen 80
#listen [:]:80;
server_name api.xx.com;
index index.htmlindex.htm index.PHP default.html default.htm default.PHP;
root /home/wwwroot/app_api;
include rewrite/none.conf;
#error_page 404 /404.html;
# denyaccesstophpfilesinspecificdirectory
# location~~/(WP-content|uploads|WP-includes ) (/. *.PHP $ { deny all; }
# include enable-PHP-pathinfo.conf;
包括启用- PHP 7.0.conf;
位置~~. *. (gif|jpg|JPEG|png|BMP|swf ) $
{
expires 30d;
}
location~~.*.(js|CSS? $
{
expires 12h;
}
位置~/. well-known {
allow all;
}
位置~/。
{
deny all;
}
access_log off;
}