【发布时间】:2013-05-11 13:11:51
【问题描述】:
我已经在新的 Ubuntu 12.04 服务器上安装并配置了 Nginx 和 varnish。将 Nginx 升级到 1.4.1 后,我不得不更新一些配置设置。现在我只看到 Nginx “欢迎使用 nginx!”页面。
请注意,在我们将 DNS 设置更新到新服务器之前,我必须通过直接 IP 地址访问此站点,不确定这是否重要。
这是我的配置:
Nginx 默认,/etc/nginx/sites-available/default:
server {
listen 81 default_server;
listen [::]:81 default_server ipv6only=on;
root /home/website/public_html;
index index.html index.htm index.php;
# Make site accessible from http://localhost/
server_name 111.111.11.11; #Server IP here
清漆默认VCL,etc/varnish/default.vcl
backend default {
.host = "127.0.0.1";
.port = "81";
.connect_timeout = 5s;
.first_byte_timeout = 10s;
.between_bytes_timeout = 10s;
}
清漆,/etc/default/varnish
DAEMON_OPTS="-a :80 \
-T localhost:6082 \
-f /etc/varnish/default.vcl \
-S /etc/varnish/secret \
-s malloc,1G"
【问题讨论】:
标签: nginx varnish varnish-vcl