中小企业web服务器的高可用集群方案设计(22)
时间:2017-01-16 19:37 来源:毕业论文 作者:毕业论文 点击:次
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 (责任编辑:qin) |