nginx配置中域名与PHP共用

上一篇 / 下一篇  2013-11-28 13:43:12 / 个人分类:问题解决方法

nginx配置中域名与PHP共用,在nginx.conf如何设置:

   server{
       listen       80;
       server_name  域名;

       location /{
       root     /var/www/test/html1;
       index   index.html  index.htm;
       }

       location ~ \.php$ {
        root /var/www/test/html1;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
        }
  }

TAG:

 

评分:0

我来说两句

Open Toolbar