• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question How to add new domain to new webstore in magento 2

bulent

Regular Pleskian
Hi,
I want to use one magento 2 install to use it with second domain. Can you help me how to add in plesk the second domain

Thanks in advance,
Bulent
 
Do you want to use Magento Multi-Store setup? If yes, we can use the "Additional Apache directives" section to send 'SetEnvIf Host' and 'MAGE_RUN' variables.
 
Do you want to use Magento Multi-Store setup? If yes, we can use the "Additional Apache directives" section to send 'SetEnvIf Host' and 'MAGE_RUN' variables.
Hi Mate,
exactly.
Should I add the second domain to main as alias?
Can you be more specific which variables and how to add them?

Thanks,
Bulent
 
You have to add the Domain as an Additional Domain with same Document Root as the other Magento website (httpdocs/pub).

Then you have to add in 'Additional Apache directives' HTTP and HTTPS both.

Code:
SetEnvIf Host domain.tld* MAGE_RUN_CODE=your_code
SetEnvIf Host domain.tld* MAGE_RUN_TYPE=website

Please refer to Magento 2 documentation for MAGE_RUN. It will explain properly.
 
Hi buddy, it seems to me that in order to help your problem, we need a person who understands Web Development and programming.
 
Hi buddy, it seems to me that in order to help your problem, we need a person who understands Web Development and programming. Perhaps your question can be Googled and a solution can be found on the Internet, but if you're asking for help right here, then you haven't found anything. I hope that there are programmers or people who have met with similar questions and they will be able to help you. I can only say that two domains on the same page can not be placed like that. I hope you will cope with this task and you will succeed. Good luck!
 
Last edited by a moderator:
Back
Top