Last active
August 29, 2015 14:02
-
-
Save iAugur/c94b616878adf1ae4100 to your computer and use it in GitHub Desktop.
Magento and Drupal in one site
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
| This Gist is to show how to set up a document structure and VHosts file to get a magento site to work alongside a Drupal site | |
| the original post is here: http://technology.blue-bag.com |
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
| # Pseudo / Skeleton VHosts file to illustrate how to use mod_alias to serve Drupal and Magento on one URL | |
| <VirtualHost :80=""> | |
| ServerName www.example.com | |
| # Set the document root to the Drupal codebase | |
| DocumentRoot /var/www/sitefolder/drupal | |
| # Set an Alias to the Magento codebase | |
| Alias /shop /var/www/sitefolder/magento | |
| <Directory /> | |
| Order Deny, Allow | |
| Deny from all | |
| </Directory> | |
| <Directory /var/www/sitefolder/> | |
| Order Deny, Allow | |
| Deny from all | |
| </Directory> | |
| # Configuration of the Drupal codebase root | |
| <Directory /var/www/sitefolder/drupal> | |
| AllowOverrride None | |
| Order Deny, Allow | |
| Allow from all | |
| <ifmodule mod_rewrite.c=""> | |
| RewriteEngine on | |
| #Drupal specific protection and rewrites go here | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule ^ index.php [L] | |
| ... | |
| </IfModule> | |
| </Directory> | |
| # Configuration of the Magento codebase root | |
| <Directory /var/www/sitefolder/magento> | |
| #Magento specific protection and rewrites go here | |
| AllowOverrride None | |
| Order Deny, Allow | |
| Allow from all | |
| <ifmodule mod_rewrite.c=""> | |
| RewriteEngine on | |
| RewriteBase /shop | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteCond %{REQUEST_FILENAME} !-i | |
| RewriteRule .* index.php [L] | |
| ... | |
| </IfModule> | |
| </Directory> | |
| </VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment