How To Configure Ecstore On Centos

搜索文件 # cd / # find . -name ‘www.conf’ # find . -name ‘php.ini’ 修改www.conf文件 listen = /var/run/php-fpm/php-fpm.sock 修改php.ini文件 date.timezone = prc enable_dl = On cgi.force_redirect = 0 cgi.fix_pathinfo=1 fastcgi.impersonate = 1 cgi.rfc2616_headers = 1 allow_url_fopen = On
server {
          listen       80;
          server_name  www.xxx.com;

          root   /usr/share/nginx/html/ecstore;
          index  index.php index.html index.htm;

          if ( $host ~* (.*)\.(.*)\.(.*)){
              set $domain $1;
          }

          location ~ ^/(.*)/data/.*\.(php)?$
          {
              return 404;
              deny all;
          }

          location ~ ^/(.*)/public/.*\.(php)?$
          {
              return 404;
              deny all;
          }

          location ~ ^/(.*)/themes/.*\.(php)?$
          {
              return 404;
              deny all;
          }

          location ~ ^/(.*)/wap_themes/.*\.(php)?$
          {
              return 404;
              deny all;
          }

          #伪静态配置开始.....

          if ($request_uri ~ (.+?\.php)(|/.*)$ ){
              break;                                                                                                                                  
          }

          location / {
              autoindex  on;
              send_timeout 1800;
              fastcgi_buffers 8 128k;
              fastcgi_intercept_errors on;
              #伪静态配置
              if ( !-e $request_filename ) {
                  rewrite ^/(.*)$ /index.php/$1 last;
              }
          }

          location ~ ^/shopadmin {
              rewrite  ^/(.*)$  /index.php/$1 last;
              break;
          }

         #伪静态配置结束......

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /usr/share/nginx/html/ecstore;
        }

        location ~ \.php {
            include        fastcgi_params;
            set $real_script_name $fastcgi_script_name;
            set $path_info "";
            set $real_script_name $fastcgi_script_name;
            if ($fastcgi_script_name ~ "^(.+\.php)(/.+)$") {
                set $real_script_name $1;
                set $path_info $2;
            }
            fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
            fastcgi_param SCRIPT_NAME $real_script_name;
            fastcgi_param PATH_INFO $path_info;
            fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
            fastcgi_index  index.php;
        }


    }
 

查询

近期文章

文章归档

分类目录

标签