使用www.site.mydomain.com时的网站加载速度比使用site.mydomain.com时要慢

时间:2015-05-21 12:31:49

标签: nginx raspberry-pi web-hosting

我使用Nginx和Raspbian(Debian Wheezy)在我的覆盆子pi上托管一个网站,我遇到了一个问题。

当我使用以下网址访问我的网站时

site.mydomain.com 

网站正常且相当快地加载,但是当我使用时:

www.site.mydomain.com 

网站加载速度非常慢,甚至无法加载某些部分(例如css)

我已经尝试过查看我的Nginx网站可用文件,但似乎没有任何错误。

server {
    listen   80; 

    root /home/user/websites/www/site.mydomain.com;
    index index.php index.html index.htm;

    server_name www.site.mydomain.com site.mydomain.com;

    location / {
            try_files $uri $uri/ /index.html;
    }

    location /doc/ {
            alias /usr/share/doc/;
            autoindex on;
            allow 127.0.0.1;
            allow ::1;
            deny all;
    }
    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log error;

    location ~ \.php$ {
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
    }

}

我可以采取哪些措施来确定问题所在?

dig www.anthony.lethuillier.net
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13809
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 4, ADDITIONAL: 9

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; ANSWER SECTION:
www.anthony.lethuillier.net. 3447 IN    A   89.158.171.35
www.anthony.lethuillier.net. 3447 IN    A   89.158.216.154
www.anthony.lethuillier.net. 3447 IN    A   85.69.0.191

;; AUTHORITY SECTION:
lethuillier.net.    73246   IN  NS  ns-fr.1and1-dns.org.
lethuillier.net.    73246   IN  NS  ns-fr.1and1-dns.com.
lethuillier.net.    73246   IN  NS  ns-fr.1and1-dns.fr.
lethuillier.net.    73246   IN  NS  ns-fr.1and1-dns.biz.

;; ADDITIONAL SECTION:
ns-fr.1and1-dns.fr. 51009   IN  A   217.160.80.4
ns-fr.1and1-dns.fr. 51009   IN  AAAA    2001:8d8:fe:53:0:d9a0:5004:100
ns-fr.1and1-dns.biz.    51009   IN  A   217.160.81.4
ns-fr.1and1-dns.biz.    51009   IN  AAAA    2001:8d8:fe:53:0:d9a0:5104:100
ns-fr.1and1-dns.com.    51009   IN  A   217.160.82.4
ns-fr.1and1-dns.com.    51009   IN  AAAA    2001:8d8:fe:53:0:d9a0:5204:100
ns-fr.1and1-dns.org.    51009   IN  A   217.160.83.4
ns-fr.1and1-dns.org.    51009   IN  AAAA    2001:8d8:fe:53:0:d9a0:5304:100

:dig anthony.lethuillier.net
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46597
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 9

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; ANSWER SECTION:
anthony.lethuillier.net. 3307   IN  A   89.158.216.154

;; AUTHORITY SECTION:
lethuillier.net.    73139   IN  NS  ns-fr.1and1-dns.org.
lethuillier.net.    73139   IN  NS  ns-fr.1and1-dns.fr.
lethuillier.net.    73139   IN  NS  ns-fr.1and1-dns.com.
lethuillier.net.    73139   IN  NS  ns-fr.1and1-dns.biz.

;; ADDITIONAL SECTION:
ns-fr.1and1-dns.fr. 50902   IN  A   217.160.80.4
ns-fr.1and1-dns.fr. 50902   IN  AAAA    2001:8d8:fe:53:0:d9a0:5004:100
ns-fr.1and1-dns.biz.    50902   IN  A   217.160.81.4
ns-fr.1and1-dns.biz.    50902   IN  AAAA    2001:8d8:fe:53:0:d9a0:5104:100
ns-fr.1and1-dns.com.    50902   IN  A   217.160.82.4
ns-fr.1and1-dns.com.    50902   IN  AAAA    2001:8d8:fe:53:0:d9a0:5204:100
ns-fr.1and1-dns.org.    50902   IN  A   217.160.83.4
ns-fr.1and1-dns.org.    50902   IN  AAAA    2001:8d8:fe:53:0:d9a0:5304:100

0 个答案:

没有答案