Created
February 10, 2022 04:36
-
-
Save scgoeswild/dac447b1a5c9d4608dacb12be3631c6e to your computer and use it in GitHub Desktop.
Magento2 setup apache2 multiwebsite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SetEnvIf Host ^(.)mcstaging.50-ml.it MAGE_RUN_CODE=IT | |
SetEnvIf Host ^(.)mcstaging.50-ml.it MAGE_RUN_CODE=EN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerName mcstaging.domain.it | |
SetEnv MAGE_RUN_CODE "IT" | |
SetEnv MAGE_RUN_TYPE "website" | |
ServerAdmin serveradmin@domain.it | |
DocumentRoot /home/production | |
ErrorLog ${APACHE_LOG_DIR}/domain-error.log | |
CustomLog ${APACHE_LOG_DIR}/domain-access.log combined | |
<Directory /home/production> | |
Options -Indexes +FollowSymLinks +MultiViews | |
AllowOverride All | |
Require all granted | |
</Directory> | |
<FilesMatch \.php$> | |
# 2.4.10+ can proxy to unix socket | |
SetHandler "proxy:unix:/var/run/php/php7.4-fpm.sock|fcgi://localhost" | |
</FilesMatch> | |
</VirtualHost> | |
<VirtualHost *:80> | |
ServerName mcstaging.domain2.it | |
SetEnv MAGE_RUN_CODE "EN" | |
SetEnv MAGE_RUN_TYPE "website" | |
ServerAdmin serveradmin@domain.it | |
DocumentRoot /home/production | |
ErrorLog ${APACHE_LOG_DIR}/domain2-error.log | |
CustomLog ${APACHE_LOG_DIR}/domain3-access.log combined | |
<Directory /home/production> | |
Options -Indexes +FollowSymLinks +MultiViews | |
AllowOverride All | |
Require all granted | |
</Directory> | |
<FilesMatch \.php$> | |
# 2.4.10+ can proxy to unix socket | |
SetHandler "proxy:unix:/var/run/php/php7.4-fpm.sock|fcgi://localhost" | |
</FilesMatch> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment