nginx配置PHP访问简化推荐
<pre class="brush:java;toolbar:false">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;
}
}</pre><p><br/></p>
页:
[1]