修改/etc/nginx/sites-available下的default文件内容为:
server {
server_name 42.121.107.174;
resolver 8.8.8.8;
resolver_timeout 5s;
location / {
proxy_pass $scheme://$host$request_uri;
proxy_set_header Host $http_host;
proxy_buffers 256 8k;
proxy_max_temp_file_size 0;
proxy_connect_timeout 30;
proxy_cache_valid 200 302 10m;
proxy_cache_valid 301 1h;
proxy_cache_valid any 1m;
}
}
-------
重新加载nginx: nginx -s reload