最近使用lnmp遇到几个问题记录一下
lnmp安装好以后需要修改几个地方
php-fpm.conf里listen的必须跟nginx里sever里面phpfast_pass保持一致
lnmp安装完成后默认是listen = /tmp/php-fcgi.sock所以这里需要修改一下
nginx server配置
server {
listen 80 ;
root 网站根路径;
server_name 你的网址;
location / {
index index.html index.htm index.php l.php;
autoindex off;
if (!-e $request_filename)
{
rewrite ^(.*)$ /index.php?s=$1 last; break;
}
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $DOCUMENT_ROOT$fastcgi_script_name;
include fastcgi_params;
}
access_log /home/wwwlogs/access.log;
}