在 Ubuntu 12.04 LTS 服务器上设置 nginx。除了这个配置文件之外,所有的一切都没有让我像我应该能够的那样使用域访问 www/ 下的文件。
这是我的文件:
server {
    listen   80;
    root /usr/share/nginx/www;
    index index.php index.html index.htm;
    server_name beta.davidheward.com;
    location / {
            try_files $uri $uri/ /index.html;
    }
    error_page 404 /404.html;
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
          root /usr/share/nginx/www;
    }
    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    location ~ .+\.php$ {
            #fastcgi_pass 127.0.0.1:9000;
            # With php5-fpm:
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
    }
}
任何想法为什么会这样,将不胜感激。我正在尝试访问 beta.davidheward.com/info.php
非常感谢。