• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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