Nginx-DreamVids的虚拟主机配置

Nginx-DreamVids的虚拟主机配置,nginx,Nginx,我正在尝试使用Nginx和PHP-FPM在我的服务器上测试DreamVids(在branchv2上)。 但当我尝试访问它时,它会下载一个文件,这是一个问题 我的配置是: server { server_name mydomain.fr; root /home/dreamvids/DreamVids; index index.html index.htm index.php; error_page 404

我正在尝试使用Nginx和PHP-FPM在我的服务器上测试DreamVids(在branchv2上)。 但当我尝试访问它时,它会下载一个文件,这是一个问题

我的配置是:

    server {
          server_name mydomain.fr;

          root /home/dreamvids/DreamVids;
          index index.html index.htm index.php;

          error_page 404 index.php;
          autoindex off;

          location / {
                try_files $uri /index.php$is_args$args;
                if (!-e $request_filename){
                       rewrite ^(.*)$ /index.php?/$1 break;
                }
          }

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

Thanx获取帮助

Thx获取答案,但listen 80已打开.conf,结果是相同的默认值my nginx listen 80。对于您的conf,结果是相同的。
server {
    listen   80;

    root /home/dreamvids/DreamVids;
    index index.html index.htm index.php;
    server_name example.com;
    location / {
            try_files $uri /index.php$is_args$args;
            if (!-e $request_filename){
                   rewrite ^(.*)$ /index.php?/$1 break;
            }
      }
            location ~ \.php$ {
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_param SCRIPT_FILENAME $request_filename;
            include fastcgi_params;
      }
}