Skip to content

Instantly share code, notes, and snippets.

@jorgehs91
Forked from Sorbog/magento2.dev-vhost.conf
Created April 15, 2021 20:55
Show Gist options
  • Save jorgehs91/4deb0ac28b5ac71fdba4fadd24ccbf39 to your computer and use it in GitHub Desktop.
Save jorgehs91/4deb0ac28b5ac71fdba4fadd24ccbf39 to your computer and use it in GitHub Desktop.

Revisions

  1. @Sorbog Sorbog renamed this gist Oct 29, 2017. 1 changed file with 10 additions and 10 deletions.
    20 changes: 10 additions & 10 deletions magento2.conf → magento2.dev-vhost.conf
    Original file line number Diff line number Diff line change
    @@ -1,28 +1,28 @@
    <VirtualHost *:80>
    ServerName magento.dev
    ServerName magento2.dev

    SetEnv MAGE_RUN_CODE "base"
    SetEnv MAGE_RUN_TYPE "website"

    DocumentRoot "/var/www/html/magento.dev/pub"
    <Directory "/var/www/html/magento.dev/pub">
    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/magento_error.log"
    CustomLog "/usr/local/var/log/httpd/magento_access.log" combined
    ErrorLog "/usr/local/var/log/httpd/magento2_error.log"
    CustomLog "/usr/local/var/log/httpd/magento2_access.log" combined
    </VirtualHost>

    <VirtualHost *:443>
    ServerName magento.dev
    ServerName magento2.dev

    SetEnv MAGE_RUN_CODE "base"
    SetEnv MAGE_RUN_TYPE "website"

    DocumentRoot "/var/www/html/magento.dev/pub"
    <Directory "/var/www/html/magento.dev/pub">
    DocumentRoot "/var/www/html/magento2.dev/pub"
    <Directory "/var/www/html/magento2.dev/pub">
    AllowOverride All
    Order Allow,Deny
    Allow from all
    @@ -32,6 +32,6 @@
    SSLCertificateFile "/usr/local/etc/httpd/server.crt"
    SSLCertificateKeyFile "/usr/local/etc/httpd/server.key"

    ErrorLog "/usr/local/var/log/httpd/magento_error.log"
    CustomLog "/usr/local/var/log/httpd/magento_access.log" combined
    ErrorLog "/usr/local/var/log/httpd/magento2_error.log"
    CustomLog "/usr/local/var/log/httpd/magento2_access.log" combined
    </VirtualHost>
  2. @Sorbog Sorbog renamed this gist Oct 29, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. @Sorbog Sorbog revised this gist Oct 29, 2017. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions magento.dev-vhost.conf
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,9 @@
    <VirtualHost *:80>
    ServerName magento.dev

    SetEnv MAGE_RUN_CODE "base"
    SetEnv MAGE_RUN_TYPE "website"

    DocumentRoot "/var/www/html/magento.dev/pub"
    <Directory "/var/www/html/magento.dev/pub">
    AllowOverride All
    @@ -15,6 +18,9 @@
    <VirtualHost *:443>
    ServerName magento.dev

    SetEnv MAGE_RUN_CODE "base"
    SetEnv MAGE_RUN_TYPE "website"

    DocumentRoot "/var/www/html/magento.dev/pub"
    <Directory "/var/www/html/magento.dev/pub">
    AllowOverride All
  4. @Sorbog Sorbog created this gist Oct 29, 2017.
    31 changes: 31 additions & 0 deletions magento.dev-vhost.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    <VirtualHost *:80>
    ServerName magento.dev

    DocumentRoot "/var/www/html/magento.dev/pub"
    <Directory "/var/www/html/magento.dev/pub">
    AllowOverride All
    Order Allow,Deny
    Allow from all
    </Directory>

    ErrorLog "/usr/local/var/log/httpd/magento_error.log"
    CustomLog "/usr/local/var/log/httpd/magento_access.log" combined
    </VirtualHost>

    <VirtualHost *:443>
    ServerName magento.dev

    DocumentRoot "/var/www/html/magento.dev/pub"
    <Directory "/var/www/html/magento.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/magento_error.log"
    CustomLog "/usr/local/var/log/httpd/magento_access.log" combined
    </VirtualHost>