<强> 强>
一、拓扑图
yum install nginx - y
,,, 2。配置nginx支持反向代理php-fpm
vi /etc/nginx conf.d/huwho.conf ,,,server { ,,,,,,,listen 80; ,,,,,,,server_name www.huwho.com,,,,, #网络站点域名 ,,,,,,,index index.php index.html 你可以; ,,,,,,,#定义一个nginx的web站点,放置web静态资源 ,,,,,,,的位置/,{ ,,,,,,,root /web/www; ,,,,,,,index index.html index.htm index . php。 ,,,,,,,} ,,,,,,,#定义一个web状态页 ,,,,,,,的位置/status { ,,,,,,,stub_status; ,,,,,,,} ,,,,,,,# pass 从而PHP scripts 用FastCGI server listening 提醒10.0.0.2:9000 ,,,,,,,#反向代理php,放置网络动态资源 ,,,,,,,的位置~ *,\美元。php, { ,,,,,,,root /web/www/php;,,,,,,,,,,,,,,,, # php的站点根目录 ,,,,,,,fastcgi_pass 10.0.0.2:9000;,,,,,,,, # fastcgi的地址 ,,,,,,,fastcgi_index index . php。 ,,,,,,,fastcgi_param SCRIPT_FILENAME /web/www/php/fastcgi_script_name美元; ,,,,,,,include fastcgi_params; ,,,,,,,} ,,,}
,,, 3。创建相应的目录
mkdir /web/www/, -pv echo nginx  web test 祝辞祝辞,/web/www/
,,, 4。启动nginx服务并测试
systemctl start nginx
2. php-fpm主机操作
,,,, 1。安装
yum install php-fpm php-mysql , php-mbstring php-mcrypt php-xcache - y
,,,, 2. php-fpm配置文件修改
,,,,修改图中三处位置
vi /etc/php-fpm.d/www.conf
,,, 3。启动php-fpm服务
systemctl start php-fpm (root@localhost ~) #, ss -tln null null null null null null null null null null null null null null null null null null null null null null null null null null null null nullcentos7.3搭建LNMP并部署wordpress站点