添加虚拟主机:

修改/usr/local/nginx/conf/nginx.conf 文件,添加如下代码:

server
        {
                listen       80;
                server_name 91d.de;
                index index.html index.htm index.php;
                root  /home/www/www.yizu.org;

                #limit_conn   crawler  20;

                #location /status {
                #stub_status    on;
                #access_log     off;
                #}

                location ~ .*\.(php|php5)?$
                        {
                                fastcgi_pass  unix:/tmp/php-cgi.sock;
                                #fastcgi_pass  127.0.0.1:9000;
                                fastcgi_index index.php;
                                include fcgi.conf;
                        }

                location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
                        {
                                expires      30d;
                        }

                location ~ .*\.(js|css)?$
                        {
                                expires      12h;
                        }

                access_log  off;
        }

为安全起见,最好把默认网站配置改为:

server {
          listen 80 default;
          return 500;
        }

如果没有默认网站,则添加上即可。