【发布时间】:2011-08-05 12:33:40
【问题描述】:
我关注了 Magento Support 的一篇文章,介绍了如何设置具有多个网站、商店和商店视图的 Magento 安装,但它搞砸了我的安装,我无法访问任何东西。多亏了对我帖子的一些回复,我才得以恢复到某种工作系统的外观。 如果有人能发现我在设置中必须做的愚蠢事情,我将不胜感激。
我对此测试设置的要求是:
- 一个单一的管理区域。
- 两个网站。
- 第一个有 1 家商店的网站(有 3 次商店浏览)。
- 第二个网站,有 2 家商店(每家都有一个商店视图)。
- 我更喜欢使用以下 URL 访问前端:http://www.firstwebsite.com 而不是 http://www.firstwebsite.com/magento/index.php
机器运行的是 Windows XP。
在商店配置中我有这个设置:
Websites:
Name=Main Website
code=base
Name=Paul Website
code=pws1
Stores:
Name=Main Store
Website=Main Website
Name=Electronics
Website=Paul Website
Name=Media
Website=Paul Website
Store Views:
Name=English
Store=Electronics
code=en1
Name=English
Store=Media
code=en2
Name=English
Store=Main Store
code=default
Name=French
Store=Main Store
code=french
Name=German
Store=Main Store
code=german
System/Configuration/General/Web(通过 URL http://test.pdapache.com/magento/index.php 访问):
Scope=Default Config
Add Store Code to Urls = No
Auto-redirect to Base URL = No
Secure and Unsecure URLs just set to {{base_url}} at this scope
Scope=Main Website
Unsecure Base URL=http://test.pdapache.com/magento/
Secure Base URL=https://test.pdapache.com/magento/
All other secure/unsecure not using default. Also Default Web URL=cms (use Default = No). CMS Home Page=Home Page (use default = no)
Scope=Paul Website
Unsecure Base URL=http://paulsplace.com/magento/
Secure Base URL=https://paulsplace.com/magento/
All other secure/unsecure not using default. Also Default Web URL=cms (use Default = No). CMS Home Page=Home Page (use default = no)
主机文件:
127.0.0.1 test.pdapache.com
127.0.0.1 www.paulsplace.com
127.0.0.1 paulsplace.com
httpd.conf:
Include conf/extra/httpd-vhosts.conf
httpd-vhosts.conf 文件:
<VirtualHost *:80>
ServerAdmin me@myemail.com
DocumentRoot "C:/Applications/Apache Software Foundation/Apache2.2/htdocs"
ServerName paulsplace.com
ErrorLog "logs/paulsplace.com-error.log"
CustomLog "logs/paulsplace.com-access.log" common
SetEnv MAGE_RUN_TYPE website
SetEnv MAGE_RUN_CODE pws1
</VirtualHost>
<VirtualHost *:80>
ServerAdmin me@myemail.com
DocumentRoot "C:/Applications/Apache Software Foundation/Apache2.2/htdocs"
ServerName pdapache.com
ErrorLog "logs/pdapache.com-error.log"
CustomLog "logs/pdapache.com-access.log" common
SetEnv MAGE_RUN_TYPE website
SetEnv MAGE_RUN_CODE base
</VirtualHost>
当我访问以下任一地址时:
http://test.pdapache.com/magento/index.php
http://www.paulsplace.com/magento/index.php
我得到一个带有 Magento 标志的页面,上面写着“没有配置或找到 Home CMS 页面”
我更愿意使用的网址,即
http://test.pdapache.com
http://www.paulsplace.com
只显示 Apache index.html “它有效!”页面。
帮助!我想我在某个地方犯了一些愚蠢的错误,可能不止一个,但我不知道在哪里。
【问题讨论】:
标签: configuration magento