Multiple Domain in same directory

Discussion in 'General' started by Sarfaraz Ali, Mar 30, 2020.

  1. Sarfaraz Ali

    Sarfaraz Ali New Member

    Hi,

    I am new to ispconfig install on a virtual machine, I just install Magento and want to set up multiple domain structure. I had created multiple views and the store also assigns URLs but when I visit the first domain it shows website and working ok, but when I visit the second domain it gives 403 error.
    ERROR 403 - Forbidden!
    The following error occurred:
    You are not permitted to access the requested URL.

    Please contact the webmaster with any queries.

    Can anyone please help me sort this out.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    1) Create a website for the main domain in ISPConfig.
    2) Add all other domains as alias domains in ISPConfig. Do not set anything on the redirect tab of the alias domain as the routing is handled by Magento.
     
  3. Sarfaraz Ali

    Sarfaraz Ali New Member

    I set up as per your instructions but it did not redirect as per Magento web rule. any idea what I missed
     

    Attached Files:

  4. till

    till Super Moderator Staff Member ISPConfig Developer

    It might be that magento requires additional htaccess or Nginx rules. Is this an apache or nginx web server?
     
  5. Sarfaraz Ali

    Sarfaraz Ali New Member

    I also setup
    SetEnv MAGE_DEBUG_SHOW_ARGS 1

    SetEnvIf Host .*cctvsaudia.com.* MAGE_RUN_CODE=base
    SetEnvIf Host .*cctvsaudia.com.* MAGE_RUN_TYPE=default

    SetEnvIf Host .*products360.co.uk.* MAGE_RUN_CODE=cctvwebsite
    SetEnvIf Host .*products360.co.uk.* MAGE_RUN_TYPE=cctvview
    in .htaccess but show anything
    There has been an error processing your request

    Exception printing is disabled by default for security reasons.

    Error log record number: 8a5a9701a9f21960254b7a205022d1196a31b739c2f320f3bebf6a41932b602b


    on both domain
     
  6. Sarfaraz Ali

    Sarfaraz Ali New Member

    while I just noticed when I enter into index.php
    switch($_SERVER['HTTP_HOST']) {
    case 'cctvsaudia.com':
    $mageRunCode = 'cctvwebsite';
    $mageRunType = 'cctvview';
    break;

    above code none of both store run but when I type individual https://products360.co.uk/ it runs and https://cctvsaudia.com/cctvview/ run successfully but when I type https://products360.co.uk/ it runs when I https://cctvsaudia.com/ it turns to https://products360.co.uk/.
    If you have little time can you come on anydesk to view where I do a mistake.
     
  7. Sarfaraz Ali

    Sarfaraz Ali New Member

    Thanks @till I manage to solve issue it was issue with code over index.php and .htaccess.
     
    Last edited: Mar 30, 2020
    till likes this.

Share This Page