Last active
July 31, 2024 00:43
-
-
Save Sorbog/c7c03d3338d3c4fd703957b79e41b709 to your computer and use it in GitHub Desktop.
Magento 2 Apache Virtual Host Configuration
This file contains hidden or 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 magento2.dev | |
SetEnv MAGE_RUN_CODE "base" | |
SetEnv MAGE_RUN_TYPE "website" | |
DocumentRoot "/var/www/html/magento2.dev/pub" | |
<Directory "/var/www/html/magento2.dev/pub"> | |
AllowOverride All | |
Order Allow,Deny | |
Allow from all | |
</Directory> | |
ErrorLog "/usr/local/var/log/httpd/magento2_error.log" | |
CustomLog "/usr/local/var/log/httpd/magento2_access.log" combined | |
</VirtualHost> | |
<VirtualHost *:443> | |
ServerName magento2.dev | |
SetEnv MAGE_RUN_CODE "base" | |
SetEnv MAGE_RUN_TYPE "website" | |
DocumentRoot "/var/www/html/magento2.dev/pub" | |
<Directory "/var/www/html/magento2.dev/pub"> | |
AllowOverride All | |
Order Allow,Deny | |
Allow from all | |
</Directory> | |
SSLEngine on | |
SSLCertificateFile "/usr/local/etc/httpd/server.crt" | |
SSLCertificateKeyFile "/usr/local/etc/httpd/server.key" | |
ErrorLog "/usr/local/var/log/httpd/magento2_error.log" | |
CustomLog "/usr/local/var/log/httpd/magento2_access.log" combined | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment