include fastcgi_params;
}
编辑/etc/nginx/fastcgi_params,将其内容更改为如下内容:
#vim /etc/nginx/fastcgi_params
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
.并在所支持的主页面格式中添加php格式的主页,类似如下:
location / {
root html;
index index.php index.html index.htm;
}
而后重新载入nginx的配置文件:
#service nginx reload
验证是否成功:
cd /usr/html
编辑 vim index.php
添加 <?php
phpinfo();
?>
5.6 配置corosync
一.停掉drbd,mysqld,nginx,php-fpm服务
[nginx2]
#umount /mydata
#service drbd stop
[nginx1]
#service drbd stop
中小企业web服务器的高可用集群方案设计(22):http://www.youerw.com/jisuanji/lunwen_2317.html