沃土规范文档系统配置文档

1.LNNP环境

2.部署路径

www主目录

/opt/kamil/www      chown -R  www:www www

nginx配置:

[root@t-scrmap1-v-szzb conf]# pwd
/usr/local/nginx/conf
View Code
 1 server {
 2         listen       80;
 3         server_name  localhost;
 4         #access_log  logs/host.access.log  main;
 5         location / {
 6             root   /opt/kamil/www;
 7             index  index.html index.php;
 8         }
 9         #error_page  404              /404.html;
10         # redirect server error pages to the static page /50x.html
11         #
12         error_page   500 502 503 504  /50x.html;
13         location = /50x.html {
14             root   html;
15         }
16 
17         # proxy the PHP scripts to Apache listening on 127.0.0.1:80
18         #
19         #location ~ \.php$ {
20         #    proxy_pass   http://127.0.0.1;
21         #}
22 
23         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
24         #
25         location ~ .*\.php(\/.*)*$ {
26             root           /opt/kamil/www;
27             fastcgi_pass   127.0.0.1:9000;
28             fastcgi_index  index.php;
29           #  fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
30                 fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
31              include        fastcgi_params;
32                 set $path_info "";
33                 set $real_script_name $fastcgi_script_name;
34                 if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
35                         set $real_script_name $1;
36                         set $path_info $2;
37                 }
38                 fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
39                 fastcgi_param SCRIPT_NAME $real_script_name;
40                 fastcgi_param PATH_INFO $path_info;
41        }
View Code

重启配置文件

[root@t-scrmap1-v-szzb kamil]# /usr/local/nginx/sbin/nginx -s reload

 

posted @ 2016-08-23 09:28  侠之大者kamil  阅读(76)  评论(0)    收藏  举报