当前位置:Gxlcms >
数据库问题 >
How To Install Linux, Nginx, MySQL, PHP (LEMP) Stack on Debian 7
How To Install Linux, Nginx, MySQL, PHP (LEMP) Stack on Debian 7
时间:2021-07-01 10:21:17
帮助过:2人阅读
80
;
root /opt/app/blog/wz/wordpress/
;
index index.php index.html index.htm;
server_name iwangzheng.com;
location /
{
try_files $uri $uri/ /
index.html;
}
error_page 404 /404
.html;
error_page 500 502 503 504 /
50x.html;
location = /
50x.html {
root /usr/share/nginx/
www;
}
location ~
\.php$ {
try_files $uri =404
;
fastcgi_pass unix:/var/run/php5-
fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
nginx.conf的第一行是user www-data;
把这个项目目录的权限修改下
sudo chown -R www-data:www-data /opt/app/blog/wz/wordpress/
4) Install and Configure PHP
Installation
You probably guessed it! We will use the apt-get command to install PHP-FPM:
sudo apt-get install php5-fpm php5-mysql
sudo service nginx restart
sudo service php5-fpm restart
How To Install Linux, Nginx, MySQL, PHP (LEMP) Stack on Debian 7
标签: