ycjnx

第 485 位会员

会员
个人信息
  • 加入于 2018-05-11 09:03:16
  • 最后登录时间 4年前
个人成就
  • 发表文章次数 9
  • 发布回复次数 15
  • 个人主页浏览次数 10
本地开发环境中想用手机访问Fecshop,各位大神你们是怎么做到的?5年前

Fecshop架在电脑上的,访问是使用的hosts文件,用的域名是自己随意设置的假域名(m.emall.com),但手机上怎么用这个假域名访问呢?看一些资料上写的要使用root修改android 手机的hosts文件才能实现,只有这一种方法吗?

部署完成,但主页显示一片空白,点其他链接报错!5年前

真的是没有数据啊:

> db.product_flat.findOne()
>

在MongoDB Shell里再导入一次:OK,有数据了!感谢 @KaiJuan

> load("/mysoft/fecshop/doc/data/TestData/mongo-fecshop-20180212-110657.js")
true
> db.product_flat.findOne()
{
	"_id" : ObjectId("57bab0d5f656f2940a3bf56e"),
	"created_at" : NumberLong(1471852757),
	"created_user_id" : NumberLong(2),
	"updated_at" : 1497865443,
......
......
>

终于看到了:

部署完成,但主页显示一片空白,点其他链接报错!5年前

MongoDB迁移时也没有报错啊:

//导入mongodb数据库:
[webadmin@centos7 eltmall] #50> ./yii mongodb-migrate  --interactive=0 --migrationPath=@fecshop/migrations/mongodb
Yii Migration Tool (based on Yii v2.0.15.1)

Total 1 new migration to be applied:
        m170228_072455_fecshop_tables

*** applying m170228_072455_fecshop_tables
*** applied m170228_072455_fecshop_tables (time: 1.655s)


1 migration was applied.

Migrated up successfully.
[webadmin@centos7 eltmall] #51> 
部署完成,但主页显示一片空白,点其他链接报错!5年前

MongoDB中有8个集合:

> show collections
article
favorite
migration
newsletter
product_flat
review
static_block
url_rewrite
> 
部署完成,但主页显示一片空白,点其他链接报错!5年前

我的nginx配置:

    server {
        listen       80;                        # 监听端口
        server_name www.emall.com en.emall.com;    # 站点域名
        root  /mywork/eltmall/appfront/web;              # 站点根目录
        index index.php;   # 默认导航页
     
        # 去掉URL中的index.php
        location / { 
             index index.php;
             if (!-e $request_filename){
                  rewrite ^/(.*)$ /index.php/$1 last;
             }   
        }     
        location /cn/ {
            index index.php;
            if (!-e $request_filename){
                    rewrite . /cn/index.php last;
            }   
        }        
        # PHP配置
        location ~ \.php$ {
            fastcgi_pass   127.0.0.1:9000;     
            fastcgi_index  index.php;                                                                                                                                                         
            include fastcgi.conf;
        }
    }
部署完成,但主页显示一片空白,点其他链接报错!5年前

Nginx报错:

2018/05/14 17:52:28 [error] 13566#0: *8 rewrite or internal redirection cycle while processing "/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/customer/ajax", client: 127.0.0.1, server: www.emall.com, request: "GET /customer/ajax?currentUrl=http%3A%2F%2Fwww.emall.com%2F&product_id= HTTP/1.1", host: "www.emall.com", referrer: "http://www.emall.com/"

一堆的index.php,这是咋出来的啊?

部署完成,但主页显示一片空白,点其他链接报错!5年前

测试数据之前导过了,也没有产品信息:

//==========================================
//导入测试数据

//测试数据:                                                                                
[webadmin@centos7 TestData] #1> pwd
/mysoft/fecshop/doc/data/TestData
[webadmin@centos7 TestData] #2> ll
total 34604
drwxr-xr-x 2 webadmin       88 May 14 14:56 ./
drwxr-xr-x 4 webadmin       63 May 14 14:55 ../
-rw-r--r-- 1 webadmin 34499576 Jun 22  2017 appimage.zip
-rw-r--r-- 1 webadmin   929671 Feb 12 11:07 mongo-fecshop-20180212-110657.js
-rw-r--r-- 1 webadmin     3830 Jun 22  2017 mysql_fecshop.sql

//导入mongodb的测试数据
[webadmin@centos7 TestData] #3> mongo 127.0.0.1:27017/eltmallmgdb --quiet /mysoft/fecshop/doc/data/TestData/mongo-fecshop-20180212-110657.js

//导入mysql的测试数据
[webadmin@centos7 TestData] #4> mysql -u root -p eltmallmydb < mysql_fecshop.sql 
Enter password: 
[webadmin@centos7 TestData] #5> 

//==导入MySQL测试数据前后变化,请查找:==importmysqltest 

//拷入图片
将appimage.zip文件解压后覆盖同名目录:
/mywork/eltmall/appimage

//清空图片缓存
[webadmin@centos7 cache] #6> cd /mywork/eltmall/appimage/common/media/catalog/product/cache
[webadmin@centos7 cache] #6> pwd
/mywork/eltmall/appimage/common/media/catalog/product/cache
[webadmin@centos7 cache] #7> rm -rf *
[webadmin@centos7 cache] #8> 

不知是什么原因?

部署完成,但主页显示一片空白,点其他链接报错!5年前
MariaDB [eltmallmydb]> show tables;
+---------------------------+
| Tables_in_eltmallmydb     |
+---------------------------+
| admin_config              |
| admin_menu                |
| admin_role                |
| admin_role_menu           |
| admin_user                |
| admin_user_role           |
| admin_visit_log           |
| article                   |
| customer                  |
| customer_address          |
| ipn_message               |
| migration                 |
| product_custom_option_qty |
| product_flat_qty          |
| sales_coupon              |
| sales_coupon_usage        |
| sales_flat_cart           |
| sales_flat_cart_item      |
| sales_flat_order          |
| sales_flat_order_item     |
| session_storage           |
| static_block              |
| url_rewrite               |
+---------------------------+
23 rows in set (0.00 sec)                                                                 

MariaDB [eltmallmydb]> 

数据库中显示有23个表,没有product表,是这样的吗?

关于默认设置的问题5年前

谢谢老大!

Your Site Analytics