Php和Nginx 整合
vim nginx.conf #打开后编辑把以下66-73注释都去掉,然后在71行加上 $document_root :这个变量可以是用来指定nginx根目录,原来没有 64 # pass the PHP scripts to FastCGI server listening on 127.0.0.1:900065 #
66 location ~ \.php$ {
67 root html;#指定网站根目录
68 fastcgi_pass 127.0.0.1:9000;
69 fastcgi_indexindex.php;
70 fastcgi_paramSCRIPT_FILENAME
71 $document_root$fastcgi_script_name; #两个变量之间不能有空格
72 include fastcgi_params;
73 }
页:
[1]