|
在安装好wdcp环境后(关于安装可以参考官网介绍),采用nginx环境安装Power企服引擎的方法
在 /www/wdlinux/nginx/conf/ 目录下增加
pahtinfo.conf
文件内容如下
- fastcgi_split_path_info ^(.+?\.php)(/.*)$;
- set $path_info $fastcgi_path_info;
- fastcgi_param PATH_INFO $path_info;
- try_files $fastcgi_script_name =404;
复制代码 在 /www/wdlinux/nginx/conf/vhost 站点目录 修改当前站点配置文件
原配置文件信息如下
- server {
- listen 80;
- root /www/web/user/public_html;
- server_name user.87th.cn;
- index index.html index.php index.htm;
- error_page 400 /errpage/400.html;
- error_page 403 /errpage/403.html;
- error_page 404 /errpage/404.html;
- error_page 503 /errpage/503.html;
- location ~ \.php(.*)$ {
- fastcgi_pass unix:/tmp/php-55-cgi.sock;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $DOCUMENT_ROOT$fastcgi_script_name;
- fastcgi_param PATH_INFO $2;
- include fcgi.conf;
- }
- location ~ /\.ht {
- deny all;
- }
- location / {
- try_files $uri $uri/ /?$args;
- }
- }
复制代码 替换为
- server {
- listen 80;
- root /www/web/user/public_html;
- server_name user.87th.cn;
- index index.html index.php index.htm;
- error_page 400 /errpage/400.html;
- error_page 403 /errpage/403.html;
- error_page 404 /errpage/404.html;
- error_page 503 /errpage/503.html;
- location ~ \.php(.*)$ {
- fastcgi_pass unix:/tmp/php-55-cgi.sock;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $DOCUMENT_ROOT$fastcgi_script_name;
- fastcgi_param PATH_INFO $2;
- include fcgi.conf;
- include pathinfo.conf;
- }
- location / {
-
- if (!-e $request_filename) {
- rewrite ^/(.*)$ /index.php?s=$1 last;
- break;
- }
- }
- }
复制代码
|
|