临海小憇

标题: nginx配置PHP访问简化推荐 [打印本页]

作者: csq39    时间: 2017-8-29 14:15
标题: nginx配置PHP访问简化推荐
server{
	listen       80;                     # 多站点(.conf),指定 listen,server_name ,root 的值。
	server_name  exam.lake1984.cn;
	root  /usr/local/server/www/exam;

	location / {
			   index index.php index.html index.html;     #添加index.php
		   }

	location ~ \.php$ {                                         #取消FastCGI 部分的注释,内容如下:
			   fastcgi_pass   127.0.0.1:9000;
			   fastcgi_index  index.php;
			   fastcgi_param  SCRIPT_FILENAME   $document_root$fastcgi_script_name;  
			   include     fastcgi_params;
	}                                                             

}







欢迎光临 临海小憇 (http://czidea.cn/) Powered by Discuz! X3.3