0
我的nginx處理來自/www的請求,該請求通過NFS掛載。如何對根文件夾執行nginx故障轉移?
我也有/WWW2這也是NFS但安裝從另一個(備份)服務器。它與/www具有相同的文件。
我怎樣才能讓nginx的自動/WWW故障轉移的根目錄/WWW2如果/WWW壞了?
我試着設置「root /」,然後是「try_files/www/ethaniel $ uri/www2/ethaniel $ uri」,但那不起作用。
這裏是我的配置:
server {
listen 80;
server_name .ethaniel.com;
root /www/ethaniel;
location/{
index index.php;
autoindex off;
}
location ~* ^.+\.(php)$ {
include /etc/nginx/fastcgi.conf.include;
}
}