Document root Magento with several domains.

Discussion in 'General' started by aqualimon, Nov 15, 2016.

  1. aqualimon

    aqualimon New Member

    I have a Ubuntu 16.04 with ISPconfig 3. I have created an client witch is going to have a magento installation with multiple country domains for different languages.

    When checking google it is suggested to change the document root for the other domains to folder of magento installation togather with some settings in .htaccess.

    How ever when I set document root of client1/web2 for example to client1/web1 I get 403 forbidden when trying to access the domain for web2. DocumentRoot /var/www/clients/client1/web1 under Options

    I have chown www-data for client1/web1

    What else is blocking this access?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The approach that you fund in google is not for ispconfig. In ispconfig, this is way easier. All you have to do is to add the other domains as alias or subdomains in ispconfig, no paths need to be changed and do not add a website for the other domains.
  3. aqualimon

    aqualimon New Member

    Hi Thanks for your reply.

    I tried to just configure the alias.

    But the problem is if i configure an alias ex --> I want the just to use the folder i do not want the domain to change to in the browser.

    Ex shop is installed on

    if user uses this is what should be shown in browser. But with the .htaccess it should pick the correct storeview ofcourse.
  4. aqualimon

    aqualimon New Member

    I have googled some more and of what i can see i need to accomplish to share the folder of the store installation
    With DocumentRoot
    Or by use of symlinks.

    But i can not get it to work any one done this with ispconfig. I have seen some example with plesk where they change the domain folder. --> /var/www/client/client1/web1/web USER web1 --> /var/www/client/client1/web1/web USER web2

    Is there a way to make some modifications in Ispconfig? Its just my own private vps so i dont care about security between the diffrent domains as it will only be this on the server.
  5. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    In your website alias settings, use Redirect Type: No redirect and SEO Redirect: No redirect.
  6. aqualimon

    aqualimon New Member

    It ends up in a redirect loop.


    I did as according to magento documentation with out the sharing of folder but with the alias instead.

    Shop is installed on
    Here is the loop scenario.
    User uses -->With Ispconfig alias setting --> install) --> magento domain rewrite .htaccess -->

    I suppose the use of alias with domain rewrite is not working.
  7. aqualimon

    aqualimon New Member

    It seems the multiple redirect issue was a browser cashe issue when cleaning it the error dissapears.

    But now the site dosent recocnize the domain alias instead it just presents the target website.

    Can i some how change the User ex web1 web2 for a website? This way i could share the folders easlily between the domains.

    What i want to accomplish is. user web1 user web1
  8. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    An alias domain is what you want, it points both names at the same document root. More specifically, it creates a single VirtualHost entry in the webserver config with a ServerName and ServerAlias entry, so there is only a single vhost definition, and hence both domain names must have the same document root. If you have your second domain as a different web user, you did not create an alias domain. (I believe this is new in ispconfig 3.1, it's under Sites > Aliasdomain for website)

Share This Page