配置 Nginx
可以把.conf 文件拉到本地,配置好再傳上去
#gzip on;
upstream cluster{
server 192.168.0.113:8848;
server 192.168.0.110:8848;
server 192.168.0.109:8848;
}
server {
listen 8848;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
#root html;
#index index.html index.htm;
proxy_pass http://cluster;
}
改動如下
[root@localhost sbin]# pwd /usr/local/nginx/sbin [root@localhost sbin]# ./nginx -c /usr/local/nginx/conf/nginx.conf
網頁可以正常訪問,再添加一個配置信息,驗證一下,能否成功保存到數據庫