Fecmall

第 2 位会员

会员
个人信息
  • 加入于 2017-05-31 17:38:45
  • 城市 Qingdao
  • GitHub https://github.com/fecshop
  • 最后登录时间 12天前
  • 签名 净化自己,潜心编码
个人简介
Terry,Fecmall开源产品作者,12年电商经验一线程序员开发者,擅长规划产品,架构设计。
个人成就
  • 发表文章次数 744
  • 发布回复次数 5760
  • 个人主页浏览次数 683
首页加载无样式8年前

@tju070 #14楼 https://pan.baidu.com/s/1kVwRD2Z 百度云盘 里面有一个环境配置文件.rar /usr/local/nginx/conf里面是我的nginx,之前的一个例子。

首页加载无样式8年前

你把none.conf 部分的配置加进去就可以了,需要rewrite

首页加载无样式8年前

可以,配置如下:(我是ssl配置的,如果是http的方式,请使用80端口,并去掉ssl的相关配置)


server {
#  listen     80  ;
	listen 443 ssl http2;
        ssl on;
        ssl_certificate /etc/letsencrypt/live/fecshop.appfront.fancyecommerce.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/fecshop.appfront.fancyecommerce.com/privkey.pem;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;  
		
    server_name fecshop.appadmin.fancyecommerce.com;
    root  /www/web/develop/fecshop/appadmin/web;
    server_tokens off;
    include none.conf;
    index index.php index.html index.htm;
    access_log /www/web_logs/access.log wwwlogs;
    error_log  /www/web_logs/error.log  notice;
	location /en/ {
		index index.php;
		if (!-e $request_filename){
			rewrite . /en/index.php last;
		}
    }

    location ~ \.php$ {
                        fastcgi_pass   127.0.0.1:9000;
                        fastcgi_index  index.php;
                        include fcgi.conf;
        }

        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
                expires      30d;
        }

        location ~ .*\.(js|css)?$ {
                expires      12h;
        }
        location /api {
                rewrite /api/([a-z][0-9a-z_]+)/?$ /api.php?type=$1;
        }


}



server {
           listen       80;
           server_name  fecshop.appadmin.fancyecommerce.com fecshop.appfront.fancyecommerce.com fecshop.appfront.es.fancyecommerce.com;
           rewrite ^(.*)$ https://$host$1 permanent;    
          
}

server {
#   listen     80  ;
	listen 443 ssl http2;
    ssl on;
    ssl_certificate /etc/letsencrypt/live/fecshop.appfront.fancyecommerce.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/fecshop.appfront.fancyecommerce.com/privkey.pem;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;   
    server_name fecshop.appfront.fancyecommerce.com fecshop.appfront.es.fancyecommerce.com;
    root  /www/web/develop/fecshop/appfront/web;
	server_tokens off;
    include none.conf;
    index index.php index.html index.htm;
    access_log /www/web_logs/access.log wwwlogs;
    error_log  /www/web_logs/error.log  notice;
    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        include fcgi.conf;
    }

	location ~ /sitemap.xml 
	{   
		if ($host  ~ .*appfront.es.fancyecommerce.com) {  
			rewrite ^/sitemap\.xml /sitemap_es.xml last;  
		}
	}

	location /fr/ {
        index index.php;
        if (!-e $request_filename){
                rewrite . /fr/index.php last;
        }
	}
	location /es/ {
        index index.php;
        if (!-e $request_filename){
                rewrite . /es/index.php last;
        }
	}

	location /cn/ {
        index index.php;
        if (!-e $request_filename){
                rewrite . /cn/index.php last;
        }
    }

	location /de/ {
        index index.php;
        if (!-e $request_filename){
                rewrite . /de/index.php last;
        }
    }

    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
            expires      30d;
    }

    location ~ .*\.(js|css)?$ {
            expires      12h;
    }


}

none.conf 是一些安全屏蔽,不让其访问一些路径的配置:

location / {
        index index.html index.php; ## Allow a static html file to be shown first
        try_files $uri $uri/ @handler; ## If missing pass the URI to Magento's front handler
        expires 30d; ## Assume all files are cachable
#		rewrite ^/$ /index.php last;
#        rewrite ^/(?!index\.php|robots\.txt|static)(.*)$ /index.php/$1 last;
    }

    ## These locations would be hidden by .htaccess normally
    location /app/                { deny all; }
    location /includes/           { deny all; }
    location /lib/                { deny all; }
    location /media/downloadable/ { deny all; }
    location /pkginfo/            { deny all; }
    location /report/config.xml   { deny all; }
    location /var/                { deny all; }
    location /var/email/ {allow all;}
    location /var/export/ { ## Allow admins only to view export folder
        auth_basic           "Restricted"; ## Message shown in login window
        auth_basic_user_file htpasswd; ## See /etc/nginx/htpassword
        autoindex            on;
    }
      location  /. { ## Disable .htaccess and other hidden files
        return 404;
    }

    location @handler { ## Magento uses a common front handler
        rewrite / /index.php;
    }

    location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
        rewrite ^(.*.php)/ $1 last;
    }
首页加载无样式8年前

@tju070 #10楼 报错的截图也没发上来,问题描述清楚了,才能猜测问题所在

首页加载无样式8年前

你说了一顿,和没说没有分别,没法回答你的问题,自己去解决吧

别人如果提供这些信息给你,问你问题,你根据这些信息,你能解决吗?扣心自问一下。

你从这几个角度去分析:

样式没有加载,你查看一下加载的css和js的链接,然后吧地址直接贴到浏览器中直接访问,是否可以访问到

如果访问不到,是不是自己nginx或者fecshop配置错了。导致css和js无法访问到。

自己是否已经把fecshop的配置完全的看完并严格执行?

首页加载无样式8年前

您是通过vagrant安装的,还是完全自己部署的环境?

把您的服务器环境发一下,操作系统,php mysql版本。

无样式的具体显示,截图发上来看一下。到底是什么样子。

安装过程中导入数据失败8年前

@tju070 #2楼 嗯,严格按照文档安装,文档安装,很多人在很多环境都安装成功了,没有太大问题。

安装过程中导入数据失败8年前

报错问题,需要把报错信息贴上来。

另外,你的mysql 和 mongodb的账户密码设置了吗?

如果失败,肯定有报错信息的,如果没有报错信息,就是你的操作有问题,把你具体的操作步骤写下来。

wamp2.5下安装fecshop失败之mongodb扩展问题8年前

@wuxincoc [#10楼](#comment10) 我已经说的很清楚了,自己去理解琢磨吧,继续解释下去没有意义。

wamp2.5下安装fecshop失败之mongodb扩展问题8年前

“而yii-mongodb2.1扩展的安装又依赖于PHP7”

上面这句话有误,应该是:

yii-mongodb2.1的安装依赖于 php mongodb扩展, 而 php mongodb扩展 在php5和php7都是可以的,因此yii-mongodb2.1 是可以在php5和php7下面使用的

wamp2.5下安装fecshop失败之mongodb扩展问题8年前

你的截图我看了,你用php -m 输出的结果如下:

在这个截图里面只有php-mongo扩展,没有php-mongodb扩展,总之,你安装php-mongodb扩展就好了。你看我的环境输出php -i

是有mongodb扩展的。

你现在清楚原因了吧?

wamp2.5下安装fecshop失败之mongodb扩展问题8年前

1.关于mongodb扩展和php版本的问题,请参看链接:

http://www.fancyecommerce.com/2016/05/03/yii2-mongodb的安装和配置-mongo/

内容:

4.安装mongodb的php扩展 ext-mongo 和 ext-mongodb

注意:Fecshop 支持php7,需要安装ext-mongodb扩展,注意,这是两个扩展,ext-mongo扩展只能在php5中使用, ext-mongodb可以在php5和php7中使用,php7不能使用ext-mongo扩展。

这里已经说的很清楚了。

2.你被胖子误导了

mongo的扩展(胖子这里说的是Yii2 mongodb扩展,不是php的mongodb扩展)最新版本是2.1, 这个扩展需要php-mongodb扩展支持 php-mongodb在php5和php7下面都是可以运行的,我测试过,一点问题也没有。

yii2-mongodb 有一个1版本,这个1版本对应的是php-mongo扩展,因此只能在php5下面跑,不支持php7

yii2-mongodb 有一个2版本,这个2版本对应的是php-mongodb扩展,因此支持php5和php7

安装报错:php extension mongodb is missing8年前

composer 安装fecshop mongodb报错解决:

1.安装php-mongodb扩展,注意不是php-mongo扩展,这是两个不同的扩展,详细参看文档:http://www.fancyecommerce.com/2016/05/03/yii2-mongodb的安装和配置-mongo/

2.安装完成后,在命令行里面操作php -i 打印看看有没有mongodb扩展,而不是通过web页面phpinfo()输出查看, 因为你的命令行的php和你的nginx指向的php,可能是2个不同的php,因此,请在命令行中执行php -i 查看是否存在mongodb扩展

php mongodb版本问题8年前

@asion #2楼 嗯,还需要注意的是 php-mongodb扩展,而不是php-mongo扩展。有不少童鞋搞错了

apidoc生成API文档的软件,8年前

@httpp886 #6楼 自己研究下把,研究成功了,分享一下,学习学习。

添加产品时页面崩溃8年前

@asion #2楼 应该是可以跳转的,不过不建议在程序层面实现跳转,在nginx设置跳转是最高效的。

apidoc生成API文档的软件,8年前

@httpp886 #4楼 您是想生成api文档,是吧?这个我没有用过,我只是用来生成文档,譬如fecshop开发文档, 对于api自动生成文档,我没有玩过,没有这方面的需求,您多研究研究吧,研究成功了,发个文章分享分享。

帮不到你了,抱歉。

热销品配置修改8年前

热销产品sku数组,我记得是在配置文件里面修改。

热销产品,一般都用假的,查看那个产品卖的好,然后写到里面

当然,这个最好是在后台设置,我这里全用配置文件来做的,如果想设置在后台,只能自己二开了。

您说的根据销量自动排,也是可以的,可以自己写一个近三个月,或者一个月的订单产品,但是网站初期上线没有订单如何破?只能先手动设置了。

首页做的比较简单,只是抽出来一些产品作为展示,您可以根据业务需要自己抽出来相应的产品,甚至把首页全部换掉,换成其他信息(没有产品)。

Your Site Analytics