nginx负载均衡实例
实例整体框架: 搭建web server: 1、安装php-fpm和mariadb-server并创建web资源存放目录: [root@webserver Desktop]# yum install -y php php-fpm php-mbstring mariadb-server php-mysql [root@webserver Desktop]# mkdir /data/html 2、配置php-fpm: #配置php-fpm [root@webserver Desktop]# vim /etc/php-fpm.d/www.conf listen = 0.0.0.0:9000 listen.allowed_clients = 10.10.0.11,10.10.0.12 pm.status_path = /status ping.path = /ping ping.response = pong php_value[session.save_handler] = files php_value[session.save_path] = /var/lib/php/session #设置会话session文件属主属组 [root@webserver Desktop]# chown apache:apache /var/lib/php/session [root@webserver