0
votes

I followed an article from Magento Support on how to set up a Magento installation with multiple websites, stores, and store views, but it screwed my installation and I couldn't access anything. Thanks to a couple of replies to my post, I was able to get back to some semblance of a working system. I would really appreciate if someone could spot what stupid thing I must have done in my setup.

My requirements for this test setup are:
- One single admin area.
- Two websites.
- First website with 1 store (with 3 store views).
- Second website with 2 stores (each with one store view).
- I'd prefer to access the frontend using URLs like: http://www.firstwebsite.com rather than http://www.firstwebsite.com/magento/index.php

Machine is running Windows XP.

In the stores configuration I have this setup:

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 (accessed by 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)

hosts file:

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 file:

<VirtualHost *:80>
    ServerAdmin [email protected]
    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 [email protected]
    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>

When I go to either of these addresses:
http://test.pdapache.com/magento/index.php
http://www.paulsplace.com/magento/index.php
I get a Magento logo-ed page that just says "There was no Home CMS page configured or found"

The URLs I'd rather be using, i.e.
http://test.pdapache.com
http://www.paulsplace.com
just displays the Apache index.html "It works!" page.

Help! I guess I've made some stupid mistake somewhere, maybe more than one, but I don't know where.

1

1 Answers

0
votes

Set your DocumentRoot to be C:/Applications/Apache Software Foundation/Apache2.2/htdocs/magento and remove the /magento from the base urls to get Magento showing at the root level.