无法在nginx+;上运行.html文件;php fpm

无法在nginx+;上运行.html文件;php fpm,nginx,php,Nginx,Php,我无法在运行Nginx和php fpm的Ubuntu 12.04服务器上运行.html文件 当执行.html扩展名文件时,我得到的是访问被拒绝。php文件运行得非常好 这是我的配置代码 nginx.conf 可用站点/默认站点 请删除可用站点/默认站点中的位置~^/*\.html$部分。请参见此处:您需要添加到[www]部分中的/etc/php5/fpm/pool.d/www.conf security.limit_extensions = .php .html 现在这并不能解决问题。html

我无法在运行Nginx和php fpm的Ubuntu 12.04服务器上运行.html文件

当执行.html扩展名文件时,我得到的是访问被拒绝。php文件运行得非常好

这是我的配置代码

nginx.conf

可用站点/默认站点


请删除可用站点/默认站点中的
位置~^/*\.html$
部分。

请参见此处:您需要添加到[www]部分中的/etc/php5/fpm/pool.d/www.conf

security.limit_extensions = .php .html

现在这并不能解决问题。html文件正在通过浏览器下载。
server {
        listen   80; ## listen for ipv4; this line is default and implied

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;

        root /data/paytm/htdocs;
        index index.php index.html;

        server_name localhost;

        ssi on;

        location ~* ^.+\.(jpg|js|jpeg|png|ico|gif|js|css|swf)$ {
                expires 24h;
        }

        location ~ ^/.*\.html$ {
                fastcgi_pass    unix:/tmp/php5-fpm.sock;
                fastcgi_index   index.html;
                fastcgi_param   SCRIPT_FILENAME  /data/paytm/htdocs/$fastcgi_script_name;
                include         fastcgi_params;
        }

        location ~ ^/.*\.php$ {
                fastcgi_pass    unix:/tmp/php5-fpm.sock;
                fastcgi_index   index.html;
                fastcgi_param   SCRIPT_FILENAME  /data/paytm/htdocs/$fastcgi_script_name;
                include         fastcgi_params;
        }


        # For APIs and other stuff where we write our own Header Variables
        underscores_in_headers on;
        ignore_invalid_headers off;
}
security.limit_extensions = .php .html