Results 1 to 9 of 9
  1. #1
    Join Date
    May 2006
    Posts
    46
    Plugin Contributions
    0

    Default configure.php for different subdomains

    Hey Zenners,

    I already setup a zencart for www.hummergearsales.com which works fine. I decided to split the products in three different shops. The main one will be www.hummergearsales.com then the two subdomains
    www.jeep.hummergearsales.com and
    www.autoaccessories.hummergearsales.com

    I copied the hummerge_zencart database to hummerge_jeep and hummerge_autoaccessories which works fine and also copied all files from www.hummergearsales.com to the folder "jeep" and "autoaccessories". I adjust the two configure.php files of each new subdomains.

    The folder catalog for www.hummergearsales.com is on the root folder
    The folder catalog for www.jeep.hummergearsales.com is under jeep/ and for
    www.autoaccessories.hummergearsales.com is under autoaccessories/

    I add to the absolute paths in configure.php jeep/ or autoaccessories/ in the right place and kept the relative paths like they are under the main domain.

    When I tested the new subdomains, they are working, but when I try to login to my admin it automatically goes to the admin of
    www.hummergearsales.com and not to
    www.jeep.hummergearsales.com or
    www.autoaccessories.hummergearsales.com

    Example: I'm in
    www.jeep.hummergearsales.com/catalog/admin and I see the login screen, when I press on the login button it refers me to www.hummergearsales.com/catalog/admin/... and I'm in the admin of the main domain and not the jeep subdomain.

    I tried to adjust the path in the configure.php files, but then I was able to go to the specific admin but some other links in the catalog didn't work or in https it didn't work.

    I hope you can help me to set up everything right, so the subdomains are working fine with SSL, like the main domain. And I can go to every admin and it's not automatically changing to the main domain admin when I login into the admin area.

    Hopefully I explained it good enough to understand.

    Thanks a lot

    I appreciate any help

    Seville

    P.S. I'm using Zencart 1.3.5

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: configure.php for different subdomains

    Did you setup other databases for each of the subdomain installs?.

    This is a DB application and you will need to have a DB for each install.
    Zen-Venom Get Bitten

  3. #3
    Join Date
    May 2006
    Posts
    46
    Plugin Contributions
    0

    Default Re: configure.php for different subdomains

    Hey Kobra,

    thanks for helping me. Like I said in my previous post, I copied the database hummerge_zencart to hummerge_jeep and hummerge_autoaccessories . Everything works fine. I also changed the database connection in each configure.php to the belonging database.

    Quote Originally Posted by seville View Post
    I copied the hummerge_zencart database to hummerge_jeep and hummerge_autoaccessories which works fine and also copied all files from www.hummergearsales.com to the folder "jeep" and "autoaccessories". I adjust the two configure.php files of each new subdomains.


    I tried several option in this part

    define('DIR_WS_ADMIN', '/catalog/admin/');
    define('DIR_WS_CATALOG', '/catalog/');
    define('DIR_WS_HTTPS_ADMIN', '/catalog/admin/');
    define('DIR_WS_HTTPS_CATALOG', '/catalog/');

    all of them with /jeep/ in front or only some and some adjustments worked to go to the admin, but not go to the different admin menus or it worked but not in https... and so on

    Hope you can help

    Seville

  4. #4
    Join Date
    Jun 2006
    Posts
    86
    Plugin Contributions
    0

    Default Re: configure.php for different subdomains

    When you say you 'adjust the two configure files' does that include the server paths in admin/includes/configure.php? I did a similar thing as you and initially I had the same problem because of the config file in admin. Now it works fine.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: configure.php for different subdomains

    Quote Originally Posted by maxima View Post
    When you say you 'adjust the two configure files' does that include the server paths in admin/includes/configure.php? I did a similar thing as you and initially I had the same problem because of the config file in admin. Now it works fine.
    FYI, there are only two configure.php files ... /includes and /admin/includes
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    May 2006
    Posts
    46
    Plugin Contributions
    0

    Default Re: configure.php for different subdomains

    yes, I adjusted both

    Seville

  7. #7
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: configure.php for different subdomains

    Try posting your admin config file x'ing out the DB & pass
    Zen-Venom Get Bitten

  8. #8
    Join Date
    May 2006
    Posts
    46
    Plugin Contributions
    0

    Default Re: configure.php for different subdomains

    here is my admin/includes config

    Code:
     <?php
    //
    /**
     *
     * @package Configuration Settings
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     */
    
    
    // Define the webserver and path parameters
      // Main webserver: eg, http://localhost - should not be empty for productive servers
      // HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
      // HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
      // HTTP_CATALOG_SERVER is your Main webserver: eg, http://www.yourdomain.com
      // HTTPS_CATALOG_SERVER is your Secure webserver: eg, https://www.yourdomain.com
      /* 
       * URLs for your site will be built via:  
       *     HTTP_SERVER plus DIR_WS_ADMIN or
       *     HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or 
       *     HTTP_SERVER plus DIR_WS_CATALOG or 
       *     HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG
       * ...depending on your system configuration settings
       */
      define('HTTP_SERVER', 'http://www.jeep.hummergearsales.com');
      define('HTTPS_SERVER', 'https://www.jeep.hummergearsales.com');
      define('HTTP_CATALOG_SERVER', 'http://www.jeep.hummergearsales.com');
      define('HTTPS_CATALOG_SERVER', 'https://www.jeep.hummergearsales.com');
    
      // Use secure webserver for catalog module and/or admin areas?
      define('ENABLE_SSL_CATALOG', 'true');
      define('ENABLE_SSL_ADMIN', 'true');
    
    // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
    // * DIR_WS_* = Webserver directories (virtual/URL)
      // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
      define('DIR_WS_ADMIN', '/catalog/admin/');
      define('DIR_WS_CATALOG', '/catalog/');
      define('DIR_WS_HTTPS_ADMIN', '/catalog/admin/');
      define('DIR_WS_HTTPS_CATALOG', '/catalog/');
    
      define('DIR_WS_IMAGES', 'images/');
      define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
      define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
      define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
      define('DIR_WS_INCLUDES', 'includes/');
      define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
      define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
      define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
      define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
      define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
      define('DIR_WS_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');
    
    // * DIR_FS_* = Filesystem directories (local/physical)
      //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
      define('DIR_FS_ADMIN', '/home/hummerge/public_html/jeep/catalog/admin/');
      define('DIR_FS_CATALOG', '/home/hummerge/public_html/jeep/catalog/');
    
      define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
      define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
      define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
      define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
      define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
      define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
      define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
    
    // define our database connection
      define('DB_TYPE', 'mysql');
      define('DB_PREFIX', 'zen_');
      define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty
      define('DB_SERVER_USERNAME', 'XXXXXX');
      define('DB_SERVER_PASSWORD', 'XXXXXX');
      define('DB_DATABASE', 'XXXXXX');
      define('USE_PCONNECT', 'false'); // use persistent connections?
      define('STORE_SESSIONS', 'db'); // leave empty '' for default handler or set to 'db'
    
      // The next 2 "defines" are for SQL cache support.
      // For SQL_CACHE_METHOD, you can select from:  none, database, or file
      // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache 
      // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
      // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash  
      define('SQL_CACHE_METHOD', 'file'); 
      define('DIR_FS_SQL_CACHE', '/home/hummerge/public_html/jeep/catalog/cache');
    
    ?>
    and here is my includes config, don't you need that too?

    Code:
    <?php
    /**
     *
     * @package Configuration Settings
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     */
    
    
    // Define the webserver and path parameters
      // HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
      // HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
      define('HTTP_SERVER', 'http://www.jeep.hummergearsales.com');
      define('HTTPS_SERVER', 'https://www.jeep.hummergearsales.com');
    
      // Use secure webserver for checkout procedure?
      define('ENABLE_SSL', 'true');
    
    // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
    // * DIR_WS_* = Webserver directories (virtual/URL)
      // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
      define('DIR_WS_CATALOG', '/catalog/');
      define('DIR_WS_HTTPS_CATALOG', '/catalog/');
    
      define('DIR_WS_IMAGES', 'images/');
      define('DIR_WS_INCLUDES', 'includes/');
      define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
      define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
      define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
      define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
      define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
      define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');
    
      define('DIR_WS_PHPBB', '/home/hummerge/public_html/phpbb/');
    
    // * DIR_FS_* = Filesystem directories (local/physical)
      //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
      define('DIR_FS_CATALOG', '/home/hummerge/public_html/jeep/catalog/');
    
      define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
      define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
      define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
      define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
      define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
    
    // define our database connection
      define('DB_TYPE', 'mysql');
      define('DB_PREFIX', 'zen_');
      define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty
      define('DB_SERVER_USERNAME', 'XXXXXX');
      define('DB_SERVER_PASSWORD', 'XXXXXX');
      define('DB_DATABASE', 'XXXXXX');
      define('USE_PCONNECT', 'false'); // use persistent connections?
      define('STORE_SESSIONS', 'db'); // leave empty '' for default handler or set to 'db'
    
      // The next 2 "defines" are for SQL cache support.
      // For SQL_CACHE_METHOD, you can select from:  none, database, or file
      // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache 
      // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
      // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash  
      define('SQL_CACHE_METHOD', 'file'); 
      define('DIR_FS_SQL_CACHE', '/home/hummerge/public_html/jeep/catalog/cache');
    
    ?>
    Thanks a lot

    Seville

  9. #9
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: configure.php for different subdomains

    I only wonder if you have an SSL for this url?? as these are specific to each and sensitive to being http://www.xxx or htpp://xxx

    I have not seen the effect of enabling SSL without an actual cert and this may or may not be the issue.

    Hope that either this might be it or that another that knows the effect responds.

    I am also relatively certian that entries such as
    Code:
      define('DIR_WS_ADMIN', '/catalog/admin/');
      define('DIR_WS_CATALOG', '/catalog/');
      define('DIR_WS_HTTPS_ADMIN', '/catalog/admin/');
      define('DIR_WS_HTTPS_CATALOG', '/catalog/');
    should reflect the path like:
    Code:
      define('DIR_WS_ADMIN', '/jeep/catalog/admin/');
      define('DIR_WS_CATALOG', '/jeep/catalog/');
      define('DIR_WS_HTTPS_ADMIN', '/jeep/catalog/admin/');
      define('DIR_WS_HTTPS_CATALOG', '/jeep/catalog/');
    Zen-Venom Get Bitten

 

 

Similar Threads

  1. Permission for configure.php file
    By Laki in forum General Questions
    Replies: 5
    Last Post: 30 Aug 2015, 10:01 PM
  2. Replies: 9
    Last Post: 1 Sep 2012, 03:13 AM
  3. Can't rename dist-configure.php because there is already a configure.php
    By mamasylvia in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 17 Mar 2008, 06:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR