nginx配置:为何会出现网址错误?

安装报错 · freetiger · 于 6年前 发布 · 2004 次阅读
# Appadmin
server {
    listen     80  ;
    server_name appadmin.fecshoptest.com;
    root  "D:/PhpStudy/www/fecshop/appadmin/web";
    server_tokens off;
    include none.conf;
    index index.php index.html index.htm;
    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;
    }
}


# AppFront
server {
    listen     80  ;
    server_name appfront.fecshoptest.com appfront.fecshoptest.es;
    root  "D:/PhpStudy/www/fecshop/appfront/web";
	server_tokens off;
    include none.conf;
    index index.php index.html index.htm;
    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        include fcgi.conf;
    }

	location ~ /sitemap.xml 
	{   
		if ($host  ~ .*appfront.fecshoptest.es) {  
			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;
    }
}


网站首页显示正常,是英文。点击“中文”,却跳转到后台管理的登录页面。请问是哪儿的错误? 我只做了这两项域名配置。如果只保留# AppFront以下部分,则一切正常。

共收到 4 条回复
Terry#16年前 0 个赞

1.确定中文对应的store,譬如演示网站为:https://fecshop.appfront.fancyecommerce.com/cn/ ,那么 需要配置store,参看:http://www.fecshop.com/doc/fecshop-guide/develop/cn-1.0/guide-fecshop-about-config.html ,第7部分。

2.配置nginx,指向 @appfront/web/cn/路径,配置文档里面已经说明

出问题就这两块没有对应好,仔细看看,要么是nginx没有指向到上面的路径,要么是store配置有问题。

freetiger#26年前 0 个赞

我还是听您的建议去阿里云上测试吧。

Fecmall#36年前 0 个赞

@freetiger #2楼 可以的,不过国内机房的阿里云需要备案,如果不想备案,可以买国外机房的阿里云,譬如香港

fec_user#46年前 0 个赞

哥们,你的网站进展的如何?上线了吗? @freetiger

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics