编译安装PHP开发环境
# vim /usr/local/nginx/conf/nginx.conf### 编辑 server 让 Nginx 支持php:
server {
listen 80;
server_namelocalhost;
location / {
root html;
indexindex.html index.htm index.php;
}
error_page 500 502 503 504/50x.html;
location = /50x.html {
root html;
}
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_indexindex.php;
fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;
include fastcgi_params;
}
}
页:
[1]